XML and newlines
Martin v. Loewis
martin at v.loewis.de
Sat Feb 16 16:29:05 EST 2002
"Chris Tavares" <christophertavares at earthlink.net> writes:
> Whitespace in XML is a little odd. It depends on the DTD/Schema wether it's
> significant or not. The normal solution is for the XML parser to have a
> "preserveWhitespace" setting, which will guarantee that you get everything
> (newlines and all). However, I took a spin through the minidom docs and
> couldn't find anything. Hmm... guess that's why it's a "mini" DOM. Have you
> tried using either SAX or 4DOM instead?
That is not the issue here. Preserving white space is only an option
for text content, and even if it is activated, line-break
normalization will still occur.
Regards,
Martin
More information about the Python-list
mailing list