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
<
Just replace the first line with blank:
import xml.dom.minidom as MD .replace(MD.Document().toxml()+'\n', '')