in reply to XML::Simple - multi level

You want to check out the ForceArray and KeyAttr options. specifically:
my $xml = XML::Simple->new( ForceArray => [ 'employee' ], KeyAttr => [ +] ); my $data = $xml->XMLin( "data.xml" ); use Data::Dumper qw(Dumper); print Dumper $data;
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 :-)