in reply to Reading multi-level-tag XML file

Using XML::XSH2, a wrapper around XML::LibXML:
#!/usr/bin/perl use strict; use warnings; use XML::XSH2; use Data::Dumper; xsh << 'end.'; open 1.xml ; $h := hash ../../../Seller/@sellerIdFromProvider /DataFeed/SellerInformation/TaxableLocationsCollection/Taxab +leLocation/@locationValue ; end. $_ = [ map $_->getValue, @$_ ] for values %$XML::XSH2::Map::h; # Con +vert attributes to strings. print Dumper($XML::XSH2::Map::h);

Update: show how to convert from XML::LibXML::Attribute objects to strings.

لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ