http://qs1969.pair.com?node_id=430436


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

my $parser = new XML::Twig(KeepSpaces => 'true', ErrorContext => 2);

No more mystery: KeepSpaces essentially tells XML::Twig to keep its hands off of whitespace management. So if you want your elements to be indented, you will have to do it yourself, by inserting an element containing the appropriate whitespace between the 2 Server elements. Or you could probably remove the KeepSpaces option alltogether. Is there any reason why it's there?