use strict; use XML::LibXML; my $parser = XML::LibXML->new; my $doc = $parser->parse_file("minimal.xml"); my @vol = $doc->findnodes(q {Volume[@VolumeCategory="L"]}); # also tried various quoting scheme... my $tmp = scalar(@vol); print "Number of entries: $tmp \n"; # 0 #### 99 0.063 2.2