when using Python\'s stock XML tools such as xml.dom.minidom for XML writing, a file would always start off like
xml.dom.minidom
<
If you're set on using minidom, just scan back in the file and remove the first line after writing all the XML you need.