sumeetgrover has asked for the wisdom of the Perl Monks concerning the following question:
Esteemed Monks,
I am using HTML::TreeBuilder::XPath module, and when I try to use the text() directive in the XPath lookup, the module fails:
$tree->findnodes_as_string('/html/body//td/text()');
I get the following error:
Can't locate object method "toString" via package "HTML::TreeBuilder::XPath::TextNode" at .../lib/XML/XPathEngine.pm line 125
So I have found out that this is a known bug with this module. (See here) My question is:
Can you recommend a reliable CPAN module which I can use to parse HTML and run an XPath query on it?
Thanks a lot.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Any Alternative to HTML::TreeBuilder::XPath?
by choroba (Cardinal) on Oct 03, 2017 at 13:06 UTC | |
by sumeetgrover (Monk) on Oct 03, 2017 at 13:40 UTC | |
Re: Any Alternative to HTML::TreeBuilder::XPath?
by haukex (Archbishop) on Oct 03, 2017 at 12:40 UTC | |
Re: Any Alternative to HTML::TreeBuilder::XPath?
by marto (Cardinal) on Oct 03, 2017 at 12:40 UTC | |
Re: Any Alternative to HTML::TreeBuilder::XPath?
by LanX (Saint) on Oct 03, 2017 at 12:42 UTC |
Back to
Seekers of Perl Wisdom