XML::Twig has options to pretty_print the output, so my $formatted_xml= XML::Twig->parse( pretty_print => 'indented', $xml)->sprint should give yoou what you want.
In reply to Re: Formatting XML
by mirod
in thread Formatting XML
by njcodewarrior
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |