I gave up on Entities ages ago, but thought I'd try it after seeing your link.
I tried this simple code: from elementtree import ElementTree as ET p = ET.XMLParser() p.entity["me"] = "Josh" text = """<test>&me;</test>""" p.feed(text) e = p.close() print e ET.dump(e) And got an error: >pythonw -u "ETParserWithEntities.py" Traceback (most recent call last): File "ETParserWithEntities.py", line 9, in <module> p.feed(text) File "C:\Python26\lib\site-packages\elementtree\ElementTree.py", line 1524, in feed self._raiseerror(v) File "C:\Python26\lib\site-packages\elementtree\ElementTree.py", line 1426, in _raiseerror raise err elementtree.ElementTree.ParseError: undefined entity: line 1, column 6 >Exit code: 1 As far as I can tell, the XMLParser is using pyexpat, which only comes as a .pyd file, so I can't look into this. Any ideas? Windows XP, Python 2.6, elementtree 1v3a2 Josh English -- Josh English joshua.r.engl...@gmail.com http://joshenglish.livejournal.com _______________________________________________ XML-SIG maillist - XML-SIG@python.org http://mail.python.org/mailman/listinfo/xml-sig