Reputation: 25611
Please imagine XML node in variable n
.
If I access this node through MSXML, I can get node's XML source with .xml
property, i.e. n.xml
will return whole node source.
How can I do the same with lxml?
Upvotes: 0
Views: 72
Reputation: 1122292
Use the .tostring()
method:
from lxml import etree
print etree.tostring(node)
Upvotes: 2