# Print raw XML from lxml import etree etree.tostring(etree.ElementTree(xml), pretty_print=True, encoding='unicode')