Maybe the 'simplify' method would work.
use Data::Dumper; use XML::Twig; my $file = $ARGV[0] || 'file.xml'; my $twig = XML::Twig->new(); my $config = $twig->parsefile( $file )->simplify( # keyattr => 'key', # group_tags => { columns => 'column', }, ); print Dumper( $config );
In reply to Re: Convert XML To Perl Data Structures Using XML::Twig
by stefbv
in thread Convert XML To Perl Data Structures Using XML::Twig
by Limbic~Region
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |