I'm using lxml as follows to parse an exported XML file from another system:
xmldoc = open(filename)
etree.parse(xmldoc)
But im getting:
lxml.etree.XMLSyntaxError: Entity 'eacute' not defined, line 4495, column 46
Obviously it's having problems with unicode entity names - but how would i get round this? Via open() or parse()?
Edit: I had forgotten to include my DTD in the same folder - it's there now and has the following declaration:
<!ENTITY eacute "é">
and is referred to (and always was) in xmldoc as so:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE DScribeDatabase SYSTEM "foo.dtd">
Yet I still get the same problem ... does the DTD need to be declared in Python too?