py.user added the comment:
Serhiy Storchaka wrote:
> I believe that in particular you can mix Python and
> C implementations of Element and lxml.etree elements in one tree.
The xml.etree.ElementTree.ElementTree() can accept lxml.etree.Element() as a
node, but node in node is impossible.
>>> import xml.etree.ElementTree as etree_xml
>>> import lxml.etree as etree_lxml
>>>
>>> elem1 = etree_xml.Element('a')
>>> elem2 = etree_lxml.Element('b')
>>> elem1.append(elem2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: must be xml.etree.ElementTree.Element, not lxml.etree._Element
>>>
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue28234>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com