I read a xml file contains
<![CDATA[<property id="SubClass"></property>]]>
When I write back into file , it will become:
<property id="SubClass"></property>
How can I avoid it and write back the original string ? I mean just write back:
<![CDATA[<property id="SubClass"></property>]]>
P.S.
I used alert()
to display it before write to file.It's all right but without .Like:
<property id="SubClass"></property>
The writing back function is following:
var xmlObj = <![CDATA[<property id="SubClass"></property>]]>;
FLfile.write(path, xmlObj);//unescape() is useless there.
FLfile is an object in jsfl(FlashJavaScript).
If you run into a problem where the parser is replacing special symbols of XML syntax, save the XML as a String opposed to XML object to preserve the data.