in reply to Re^3: Formatting in XML::Twig->print()
in thread Formatting in XML::Twig->print()

Indeed, but did you try using the pretty_print => 'indented' option too?

Replies are listed 'Best First'.
Re^5: Formatting in XML::Twig->print()
by Nitrox (Chaplain) on Feb 12, 2005 at 19:59 UTC
    Perfect! That is the combination I was looking for.

    One other minor issue; the Encoding declaration line, <?xml version="1.0" encoding="ISO-8859-1"?>, from the original input file doesn't get written to the output file. Is this another setting I overlooked or do I need to simply print that manually before printing the XML?

    Thanks for all your help.

    -Nitrox

      I think it is because you print the root element of the document ($parser->root->print(\*PF)), instead of simply printing the document ($parser->print(\*PF)).