How to write an XML file without header in Python?

Posted by Nico on Stack Overflow See other posts from Stack Overflow or by Nico
Published on 2010-05-29T00:28:41Z Indexed on 2010/05/29 0:32 UTC
Read the original article Hit count: 672

Filed under:
|

Hi,

when using Python's stock XML tools such as xml.dom.minidom for XML writing, a file would always start off like

<?xml version="1.0"?>

[...]

While this is perfectly legal XML code, and it's even recommended to use the header, I'd like to get rid of it as one of the programs I'm working with has problems here.

I can't seem to find the appropriate option in xml.dom.minidom, so I wondered if there are other packages which do allow to neglect the header.

Cheers,

Nico

© Stack Overflow or respective owner

Related posts about python

Related posts about Xml