XML::Parser::Style::IxTree - Maintain tag attribute ordering when parsing XML into a tree
my $p = XML::Parser->new(Style => 'IxTree');
my $tree = $p->parsefile('foo.xml');
This module implements XML::Parser's IxTree style parser (same as 'XML::Parser::Style::Tree', but it keeps tag attributes in their original order, thanks to Tie::IxHash). This allows to parse and then reconstruct the original document with respect to original attribute ordering).
Tree Parser on CPAN: http://search.cpan.org/~msergeant/XML-Parser/Parser/Style/Tree.pm
Tie::IxHash on CPAN: http://search.cpan.org/~chorny/Tie-IxHash/
To install XML::Parser::Style::IxTree, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.