in reply to Any Alternative to HTML::TreeBuilder::XPath?
What is your expected output? Perhaps you just need to implement a workaround:
use warnings; use strict; use HTML::TreeBuilder::XPath; use Data::Dump; my $tree= HTML::TreeBuilder::XPath->new; $tree->parse(<<'ENDHTML'); <html><body><table> <tr> <td>Foo</td> <td>Ba<em>r</em> </td> </tr> <tr> <td>Quz</td> <td><b>Ba<i>z</i></b></td> </tr> </table></body></html> ENDHTML $tree->eof; dd map {$_->as_text} $tree->findnodes('/html/body//td'); dd $tree->findnodes_as_strings('/html/body//td'); __END__ ("Foo", "Bar", "Quz", "Baz") ("Foo", "Bar", "Quz", "Baz")
|
|---|