I wrote a script reading XML files using minidom:
from xml.dom.minidom import parse
for File in Data['FileList']:
Xml = parse(File)
#do something
which runs fine, but some guys are creating XMLs defining UTF-8 encoding in the XML and using German Umlaute in tags so I ran into xml.parsers.expat.ExpatError: not well-formed (invalid token).
If I change manually in the XML to encoding="ISO-8859-1" it runs fine.
Is there a more elegant way of changing the encoding, instead of editing the XML files, e.g. telling minidom to use a different encoding than defined in the XML?