#### use warnings; use strict; use XML::Simple qw(:strict); use XML::SAX::Expat; use Data::Dumper; my $xmlParser = XML::Simple->new( ForceArray => 1, # force the contents of all elements to be an array KeepRoot => 1, # keep the root tag SuppressEmpty => '', # represent empty elements as empty strings KeyAttr => {}, # do not fold any tags ); my $info = $xmlParser->XMLin('') || die "Problem: $!\n"; print Dumper($info);