Skip to content

Instantly share code, notes, and snippets.

@henrycjc
Created October 9, 2017 01:54
Show Gist options
  • Save henrycjc/bc77eb000f60ec8c6ce35b743c67b46d to your computer and use it in GitHub Desktop.
Save henrycjc/bc77eb000f60ec8c6ce35b743c67b46d to your computer and use it in GitHub Desktop.
xmlpretty.py
import lxml.etree as et
xmldoc = et.parse("plan.xml")
f = open("output.xml", 'w')
f.write(et.tostring(xmldoc, pretty_print=True))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment