in reply to Need Help Understanding Parsing XML into multi level struck

here is something that helped me, i found it on another PM thread but cant find link
use XML::Simple; my $xs = XML::Simple->new( ForceArray => 1,suppressempty => '' ); my @href = $xs->XMLin(shift); print Dumper(@href);
here is another way
Parsing XML

Replies are listed 'Best First'.
Re^2: Need Help Understanding Parsing XML into multi level struck
by Aristotle (Chancellor) on Mar 20, 2004 at 10:21 UTC
    Or simpler
    use XML::Simple; my @href = XMLin(shift, ForceArray => 1, suppressempty => '' ); print Dumper @href;
    and then as a oneliner
    perl -MXML::Simple -e'print Dumper XMLin(shift, ForceArray => 1, suppr +essempty => "" )' foo.xml

    Makeshifts last the longest.