[fpc-pascal] XML - Indent, text content, special char

Michael Van Canneyt michael at freepascal.org
Sun Apr 28 09:35:34 CEST 2019

On Sun, 28 Apr 2019, Gabor Boros wrote:

> 2019. 04. 27. 13:57 keltezéssel, Michael Van Canneyt írta:
>> As far as I know you can't. I recently changed some things in xmlwriter 
>> so you can
>> influence the formatting to some degree, but no attempt is made to respect
>> the formatting of a previously read file. I believe the formatting info is
>> discarded on read (I would need to veify) so this would require lots of
>> rewriting.
> The "indent" and "text content" problems solved on the reader side by 
> ReadXMLFilePreserveWhitespace:
> http://wiki.freepascal.org/XML_Tutorial#Whitespace_characters

Nice. Again something learned.

In that case, disabling indent (set size=0) and CRLF (set lineending to
0-empty string) in the newly exposed XMLWriter will probably do the trick.


More information about the fpc-pascal mailing list