How can I view a text representation of an lxml element?

Viewed 20986

If I'm parsing an XML document using lxml, is it possible to view a text representation of an element? I tried to do :

print repr(node)

but this outputs

<Element obj at b743c0>

What can I use to see the node like it exists in the XML file? Is there some to_xml method or something?

1 Answers
Related