in reply to XML Writer indentation

I finally gave up on XML::Writer and switched to XML::Generator. Not only does it give you a Perl-ish interface (Writer is sooo Java) -- it actually formats your XML output in ways you want. 8)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re^2: XML Writer indentation
by Anonymous Monk on Feb 15, 2012 at 20:01 UTC

    I found a super simple solution here:

    http://blog.namran.net/2011/01/22/xml-beautify-using-perl-xmlwriter/

    Basically, what one needs is this:

    my $writer = new XML::Writer ( OUTPUT => \$xml, DATA_MODE => 1,DATA_INDENT => 2 );