Entity references and lxml

后端 未结 1 734
南旧
南旧 2020-12-19 03:26

Here\'s the code I have:

from cStringIO import StringIO
from lxml import etree

xml = StringIO(\'\'\'


        
相关标签:
1条回答
  • 2020-12-19 04:05

    The "unresolved" Entity is left as child node of the element node sub

    >>> print d2.find('/sub')[0]
    &test;
    >>> d2.find('/sub').getchildren()
    [&test;]
    
    0 讨论(0)
提交回复
热议问题