in reply to Re^2: Reading multi-level-tag XML file
in thread Reading multi-level-tag XML file

You are not clearing the @location array for each Seller. Try

for my $inf (@{$data->{'SellerInformation'}}) { my $sellerid = $inf->{'Seller'}[0]{'sellerIdFromProvider'}; my @location=(); for my $loc (@{$inf->{'TaxableLocationsCollection'}[0]{'TaxableLocat +ion'}}) { push @location,$loc->{'locationValue'}; } print $sellerid."\t" .join(", ", @location)."\n"; }
poj

Replies are listed 'Best First'.
Re^4: Reading multi-level-tag XML file
by CSharma (Sexton) on Jul 28, 2015 at 06:46 UTC
    Thanks poj, got the required data!