in reply to XML::LibXML count nodes
Try this:
print scalar(@{$doc->findnodes('//category')});I've done it by assigning the nodes to an array and then just printing the number of elements in the array.
In Section
Seekers of Perl Wisdom
in reply to XML::LibXML count nodes
Try this:
print scalar(@{$doc->findnodes('//category')});I've done it by assigning the nodes to an array and then just printing the number of elements in the array.