[xml] XML Formatting



Hi,

I have a xml document as follows
<Testing>\n<Val foo=\"baa\">xxx </Val></Testing>

Note the \n after <Testing>.

If I load and then save using libxml, the formating appears to be lost.

I've used xmlNodeDump with format to 1 and xmlTreeIndentString="\t", and yes it indents, but thew whole document.

MSXML3 only formats the places that have a \n, in the example above it would changed the \n -> \r\n\t.

1.Is there a way to reproduce this bahaviour?

2. Is there a way to normalize EOL's to \r\n?

Best Regards

Alistair Leslie-Hughes







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]