
Hello all, Is the resolve_entities XmlParser constructor attribute not working or what did I do wrong ? howe@yezda ~ $ python Python 2.5.1 (r251:54863, Jan 9 2008, 05:34:21) [GCC 4.2.2 (Gentoo 4.2.2 p1.0)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from lxml import etree print etree.__version__ 2.0.1 print etree.LIBXML_VERSION (2, 6, 30) import StringIO xml = StringIO.StringIO('<?xml version="1.0" encoding="utf-8"?> <p>©</p>') etree.parse(xml, etree.XMLParser(resolve_entities=False)) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "lxml.etree.pyx", line 2515, in lxml.etree.parse File "parser.pxi", line 1743, in lxml.etree._parseDocument File "parser.pxi", line 1775, in lxml.etree._parseMemoryDocument File "parser.pxi", line 1676, in lxml.etree._parseDoc File "parser.pxi", line 793, in lxml.etree._BaseParser._parseDoc File "parser.pxi", line 450, in lxml.etree._ParserContext._handleParseResultDoc File "parser.pxi", line 534, in lxml.etree._handleParseResult File "parser.pxi", line 476, in lxml.etree._raiseParseError lxml.etree.XMLSyntaxError: Entity 'copy' not defined, line 1, column 46
Thanks! -- Best Regards, Steve Howe