How to write an XML file without header in Python?

后端 未结 7 1408
盖世英雄少女心
盖世英雄少女心 2021-02-06 01:28

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

<

7条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-06 02:06

    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.

提交回复
热议问题