in reply to XML::Simple - multi level
Update: Actually, you don't need the ForceArray in this instance, but it is one of the most used options in the module, and you would need it if, e.g., you might only have one employee, so my advice to check out those options still stands :-)my $xml = XML::Simple->new( ForceArray => [ 'employee' ], KeyAttr => [ +] ); my $data = $xml->XMLin( "data.xml" ); use Data::Dumper qw(Dumper); print Dumper $data;
|
|---|