HTML::TreeBuilder::XPath is a Perl module that adds typical XPath methods to HTML::TreeBuilder, to make it easy to query a document.
SYNOPSIS
use HTML::TreeBuilder::XPath;
my $tree= HTML::TreeBuilder::XPath->new;
$tree->parse_file( "mypage.html");
my $nb=$tree->findvalue( '/html/body//p[@class="section_title"]/span[@class="nb"]');
my $id=$tree->findvalue( '/html/body//p[@class="section_title"]/@id');
my $p= $html->findnodes( '//p[@id="toto"]')->[0];
my $link_texts= $p->findvalue( './a'); # the texts of all a elements in $p
$tree->delete; # to avoid memory leaks, if you parse many HTML documents
Product's homepage
Requirements:
· Perl