lxml unicode entity parse problems

Posted by Jon Hadley on Stack Overflow See other posts from Stack Overflow or by Jon Hadley
Published on 2010-05-14T14:53:02Z Indexed on 2010/05/14 14:54 UTC
Read the original article Hit count: 333

Filed under:
|
|
|

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()?

© Stack Overflow or respective owner

Related posts about python

Related posts about lxml