Here\'s the code I have:
from cStringIO import StringIO from lxml import etree xml = StringIO(\'\'\'
The "unresolved" Entity is left as child node of the element node sub
sub
>>> print d2.find('/sub')[0] &test; >>> d2.find('/sub').getchildren() [&test;]