in reply to Re: Re: How do you scan HTML?
in thread How do you scan HTML?

I actually considered using XML::LibXML and XML::XPath to solve this. Personally, i don't like my solution above very much ... the HTML doesn't seem to match very well with my HTML::TokeParser::Simple solution (but i do wonder how Ovid would have solved it ;)).

I have a few nodes that demonstrate XPath:

Also, i find zvon.org's XPath Tutorial to be quite excellent. XPath is worth learning. ;)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re: 3Re: How do you scan HTML?
by Ovid (Cardinal) on Sep 22, 2003 at 19:43 UTC

    jeffa wrote: but I do wonder how Ovid would have solved it.

    Ovid replies:

    #!/usr/bin/perl -w use strict; use WWW::Mechanize; my $browser = WWW::Mechanize->new(); $browser->get('http://www.chessgames.com'); $browser->follow_link( url_regex => qr/chessgame\?gid=\d+/ ); $browser->follow_link( text => 'view text' ); print $browser->content;

    I think that's a wee bit easier to follow :)

    Cheers,
    Ovid

    New address of my CGI Course.