in reply to Re: HTML::TreeBuilder:: identifing xpath-expression - first attempt
in thread HTML::TreeBuilder:: identifing xpath-expression - first attempt

Hi,

Try with WWW::Mechanize

It can solve your problem easily

Regards,
Vivek
  • Comment on Re^2: HTML::TreeBuilder:: identifing xpath-expression - first attempt

Replies are listed 'Best First'.
Re^3: HTML::TreeBuilder:: identifing xpath-expression - first attempt
by Anonymous Monk on Oct 17, 2010 at 09:20 UTC
    Hi viveksnv
    • kcott doesn't have the problem, Perlbeginner1 does (clicking the correct reply/comment on link is important)
    • WWW::Mechanize won't help him extract html by xpath queries
      I experimented with this:
      #!/usr/bin/perl use strict; use warnings; use HTML::TreeBuilder::XPath; use LWP::Simple; use Test::WWW::Mechanize; use WWW::Mechanize::TreeBuilder; use Data::Dumper::Concise; my $tree = HTML::TreeBuilder::XPath->new; my $mech = Test::WWW::Mechanize->new; WWW::Mechanize::TreeBuilder->meta->apply($mech); $tree->parse_content(get 'http://www.educa.ch/dyn/79376.asp?id=1187'); print Dumper($tree->as_text('//tr'));
      Update:: not finished - will integrate $mech->find_xpath later.
        hello Khen1950fx

        that looks great!

        a find_Xpath would be amazing