item_a item_b
#### #!/usr/bin/perl use strict; use warnings; use feature 'say'; use XML::LibXML; my $file = 'test.xml'; #my $node; my $parser = XML::LibXML->new(); my $doc = $parser->load_xml(location => $file); my($object11) = $doc->findnodes('/header/idset'); say 'a: ',$object11->findvalue('./a'); say 'b: ',$object11->findvalue('./b'); say 'id: ',$object11->findvalue('./id');