#!/usr/bin/perl -w use strict; use warnings; use File::Glob; use XML::Simple; use Data::Dumper; my @files = glob("//Server/Share/*.xml"); my $xml = XML::Simple->new(KeyAttr=>[]); #, ForceArray=>1); foreach my $x (@files) { my $data = $xml->XMLin($x); foreach my $key (@{$data->{Jobs}->{Job}->{Blocks}->{Block}->{Batch +es}->{Batch}->[0]->{Items}->{Item}}) { print $key->{CorporateName} . "\n"; print $key->{Amount} . "\n"; } }
In reply to XML::Simple Multi Level Array by drodinthe559
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |