in reply to XML::XPath tricks and tips
Disclaimer: I've never used XML::XPath and don't even have it installed. I'm writing this from a quick glance at the documentation and my experience working with XML::LibXML. You should get the idea.
for my $available ( $xp->findnodes( '//Available' ) ) { my $qty = $available->findvalue( 'Qty' ); my $part = $available->findvalue( 'Part' ); # ... }
The important part is to realize that the XPath expressions passed to $available->findvalue() will be evaluated relative to the node $available represents.
Makeshifts last the longest.
|
|---|