XML minidom Parsing and ToPrettyXML

Wojciech Muła wojciech_mula at poczta.null.onet.pl.invalid
Sun Mar 25 20:40:49 EDT 2007


Paul Kozik wrote:
> However, if I use xml.minidom.parse to parse the xml document, change
> a few attributes with setAttribute, then write back with toprettyxml,
> my XML file gets loaded up with spaces between many of the elements.

Use 'toxml' method, that writes XML document without any modification.

w.



More information about the Python-list mailing list