pretty_print = lambda data: '
'.join([line for line in xml.dom.minidom.parseString(data).toprettyxml(indent=' '*2).split('
') if line.strip()])
pretty_print = lambda data: '
'.join([line for line in xml.dom.minidom.parseString(data).toprettyxml(indent=' '*2).split('
') if line.strip()])