Consider :
my @res = $twig_root->get_xpath($xpath_arg); foreach ( @res ) { print $_->xpath . " : "; print $_->text . "\n"; }
However if an element contains attribute=value, these are not shown on the xpath string.
print XML::XPath::XMLParser::as_string( $_ ) will show this, but I cannont see the full 'path' in this manner..
any suggestions ?
In reply to newbie : XPath - including element attributes by jxh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |