from lxml import etree
print(etree.tostring(root, pretty_print=True))
you may see more examples here: http://lxml.de/tutorial.html
from lxml import etree
print(etree.tostring(root, pretty_print=True))
you may see more examples here: http://lxml.de/tutorial.html