http://www.perlmonks.org?node_id=464747


in reply to Re^3: Manipulate xml with libxml
in thread Manipulate xml with libxml

As much as it pains me to say this ;--( ... if libxml2 is installed, it might be just as simple to use xmllint --format. And XML::Twig comes with a standalone tool: xml_pp.