Assuming your data in memory looks like this:
my $parsed = { A => { B => { C => [ qw/here is your list/ ], }, }, };
You can then get your list with my @list = @{ $parsed->{A}{B}{C} } .
Is this what you are trying to do?
Edit: based on some comments, maybe you want Data :: Visitor :: Callback . Then you can extract all arrays, for example:
my @arrays; my $v = Data::Visitor::Callback->new( array => sub { push @arrays, $_ }, ); $v->visit( $parsed_xml );
After that, \ @arrays will be a list of links to arbitrary deeply nested arrays.
Finally, if you just have an attribute name and want to match XML nodes, you really want XPath:
use XML::LibXML; my $parser = XML::LibXML->new; my $doc = $parser->parse_string( $xml_string );
Anyway, TMTOWTDI. If you are working with XML and want to do something complex, XML :: Simple is rarely the right answer. I use XML :: LibXML for everything, since it is almost always simpler.
One more thing you might want Data :: DPath . This allows you to "XPath" in the perl data structure in memory:
source share