in reply to Reading multi-level-tag XML file
The use of this module in new code is discouraged. Other modules are available which provide more straightforward and consistent interfaces. In particular, XML::LibXML is highly recommended.
You can solve your issues by using the ForceArray option to XMLin:
my $data = XMLin($xml_string, ForceArray => 1); for my $inf (@{ $data->{SellerInformation} }) { print $inf->{Seller}[0]{sellerIdFromProvider}, "\n"; for my $location (@{ $inf->{TaxableLocationsCollection}[0]{Taxable +Location} }) { print "\t", $location->{locationValue}, "\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reading multi-level-tag XML file
by CSharma (Sexton) on Jul 27, 2015 at 16:28 UTC | |
by poj (Abbot) on Jul 27, 2015 at 19:57 UTC | |
by CSharma (Sexton) on Jul 28, 2015 at 06:46 UTC |