#!/usr/bin/env python from lxml import etree import sys doc = etree.parse(open(sys.argv[1])) print etree.tostring(doc, pretty_print=True)