in reply to Re: Problem parsing XML into arrays using XML::Simple
in thread Problem parsing XML into arrays using XML::Simple
Wow, thanks for that code. As is always the case minutes after posting to this site I came across a solution that works but now I will also try your code as well to see which works best. Thanks again
This is what I found to work
use LWP::Simple; use XML::Simple; use Data::Dumper; use strict; use warnings; my $xml = new XML::Simple (KeyAttr=>[]); my $parser = $xml->XMLin("c:\\temp\\data.xml"); print Dumper($parser); foreach my $e (@{$parser->{FragmentAssets}->{asset}}) { print $e->{url}, "\n"; print "\n"; }
|
|---|