Problems? Is your data what you think it is? | |
PerlMonks |
Re: Help debugging xpath in Perlby choroba (Cardinal) |
on Mar 12, 2021 at 19:27 UTC ( [id://11129527]=note: print w/replies, xml ) | Need Help?? |
It seems XML::Twig doesn't understand /text(). But maybe you don't need it? This seems to work:
If you want to use the full XPath, switch to XML::LibXML. For large files, you can use its XML::LibXML::Reader. To experiment with XPath, you can use XML::XSH2, which is like xmllint combined with Perl.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In Section
Seekers of Perl Wisdom
|
|