Graeme Geldenhuys wrote:

> I know whitespace is irrelevant in XML, but I always thought there was
> a "pretty format" option somewhere. FPCUnit's xml output is formatted
> pretty. So is Lazarus's .xml config files.  What do they use then?
> 
The specs (DOM level 3 Load and Save) define such an option, but it 
isn't implemented yet. Both FCL and Lazarus XML writers try to 
pretty-format their output, but it isn't perfect. FCL writer used to 
write 'leaf' nodes (i.e. nodes without children) without indenting - 
this is what you see in the original example.
However, that algorithm was causing troubles with the files which were 
read with 'PreserveWhitespace' option set to True - it actually 
duplicated all whitespace. Therefore in r10314 this algorithm was 
changed to 'do not write indents adjacent to text nodes'. This should 
look nicer.

Regards,
Sergei

_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to