I wanted to parse a fairly huge xml-like file which doesn\'t have any root element. The format of the file is:
How about instead of editing the file do something like this
import xml.etree.ElementTree as ET with file("xml-file.xml") as f: xml_object = ET.fromstringlist(["", f.read(), ""])