Page 1 of 1

avoid corrupt of xml files

Posted: Tue Oct 26, 2010 9:54 am
by bess
hello everybody

my question may not be obvious to any English but i've still hoping to found my answer with you

when you make a xml file with your module, you must doing some things to avoid corrupt of your xml file
  • avoid all emphasis in all files (.tpl, .php, .js, language files, ...)
  • avoid all windows files like thumb.db
I've already done all this things but... it's still corrupt

any ideas ?  ???

all emphasis already treated :
àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ

Re: avoid corrupt of xml files

Posted: Tue Oct 26, 2010 10:12 am
by bess
with notepadd++ i made this search in regex

[^A-Za-z0-9=?&%\*#\-_+/;:,!'" /\.\[\]{}()@\t$\\|\^]

to find all but this list
  • A->Z
  • a->Z
  • 0->9
  • =
  • ?
  • &
  • %
  • -
  • _
  • +
  • /
  • ;
  • :
  • ,
  • !
  • '
  • "
  • space
  • [ and ]
  • { and }
  • ( and )
  • @
  • tab (\t)
  • $
  • \
  • | (pipe)
  • ^ (xor)
no result. So what can i do ?

Re: avoid corrupt of xml files

Posted: Thu Nov 04, 2010 12:29 pm
by bess
any ideas ?

Re: avoid corrupt of xml files

Posted: Sat Nov 06, 2010 6:12 pm
by cyberman
How have you create the xml files?

Re: avoid corrupt of xml files

Posted: Mon Nov 08, 2010 4:25 pm
by bess
admin > modules > clic on xml button

Re: avoid corrupt of xml files

Posted: Sat Nov 13, 2010 4:22 pm
by bess
good news :

xml file created from my pc (windows + Wampserver) = corrupt
xml file created from my server (unix + apache) = ok

i don't understand why... maybe the config of my wampserver ?

Re: avoid corrupt of xml files

Posted: Sat Nov 13, 2010 8:57 pm
by NaN
It is the encoding of the linebreaks i guess.
Windows, Mac OS X and Unix use different ones.
There should be an option in Notepad++ to setup what line endings should be used.

Make also sure that your file is stored with utf8 or unicode encoding.
Windows uses ASCII or ANSI by default i guess.
This also may mess up the content of the file.

In the most cases i opened the XML file with an editor that supports unicode or UTF-8 encoding and appropriate settings and just stored it again.

See also: http://forum.cmsmadesimple.org/index.ph ... 143.0.html

Re: avoid corrupt of xml files

Posted: Mon Nov 15, 2010 1:30 pm
by bess
yes Nan, you must have right...

bad news for me but at last i've solution :)