in reply to Formatting in XML::Twig->print()
Why not prettifying in a post-processing step?
I mean, if you happen to have libxml2 installed, then you have the unbeatible xmllint utility at your disposal:
This results in a beautiful XML layout:rg@something:/tmp$ echo '<PrimaryServers><Server Name="New_2"/><Server + Name="New_1"/></PrimaryServers>' | xmllint --format -
<?xml version="1.0"?> <PrimaryServers> <Server Name="New_2"/> <Server Name="New_1"/> </PrimaryServers>
rg0now