Hi All,

I have an existing XML file. After load(, modify) and save this file some mandatory formatting things lost from it. I need same indent as before, same text contents and not replace every special chars. With the below code I got the attached OUTPUT.xml from the attached INPUT.xml. Any idea how to solve this problem? (I use fixes_3_2.)

X:=TXMLDocument.Create;
ReadXMLFile(X,'INPUT.xml');
WriteXMLFile(X,'OUTPUT.xml');

Gabor
<?xml version="1.0" encoding="UTF-8"?>
<DOC xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
	<TEXT1>a    </TEXT1>
	<TEXT2>     </TEXT2>
	<TEXT3>X > Y</TEXT3>
	<VALUE xsi:type="xs:string">     </VALUE>
</DOC>
<?xml version="1.0" encoding="utf-8"?>
<DOC xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <TEXT1>a    </TEXT1>
  <TEXT2/>
  <TEXT3>X &gt; Y</TEXT3>
  <VALUE xsi:type="xs:string"/>
</DOC>
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to