Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] CPAN, documentation for HTML::TreeBuilder

Expand Messages
  • Rob Wiltbank
    I did a quick google and found a look_down() method as part of HTML::Element that has some pretty extensive documentation... maybe that ll help you out.
    Message 1 of 4 , Apr 25, 2006
    • 0 Attachment
      I did a quick google and found a look_down() method as part of HTML::Element
      that has some pretty extensive documentation... maybe that'll help you out.

      http://search.cpan.org/~petdance/HTML-Tree-3.1901/lib/HTML/Element.pm


      On 4/25/06, David Seruyange <idmkid@...> wrote:
      >
      > Thanks Rob.
      >
      > I did do a search on CPAN and found that documentation you reference, but
      > found it making no mention of the look_down method the instance of
      > HTML::TreeBuilder seems to expose.
      > I did find a simpler example at
      > http://experts.about.com/q/Perl-CGI-1045/HTML-TreeBuilder-help-create.htmwhich made look_down seem obvious to me:
      >
      > my $page = get($url) or die $!;
      > my $p = HTML::TreeBuilder->new_from_content( $page );
      >
      >
      > my @links = $p->look_down(
      > _tag => 'tr',
      > valign => 'bottom'
      > );
      >
      > Filter based on the element and any specific attribute values, correct?
      >
      > David
      >
      >
      > ----- Original Message ----
      > From: Rob Wiltbank <wiltbank@...>
      > To: perl-beginner@yahoogroups.com
      > Sent: Tuesday, April 25, 2006 1:02:35 PM
      > Subject: Re: [PBML] CPAN, documentation for HTML::TreeBuilder
      >
      > Check out:
      > http://search.cpan.org/~sburke/HTML-Tree-3.18/lib/HTML/TreeBuilder.pm
      >
      > The documentation for almost any module can be found on CPAN.
      >
      > On 4/25/06, David Seruyange <idmkid@...> wrote:
      > > Hey,
      > >
      > > I've been messing around with O'Reilly's Spidering Hacks book. One
      > example
      > > makes use of HTML::TreeBuilder but I was wondering where I could find
      > more
      > > documentation since, as a Hacks book it doesn't elaborate beyond the
      > example
      > > given. Specifically, I'm trying to understand what the following means
      > (Hack
      > > #19 p.53 if you own the book):
      > >
      > > my $p = HTML::TreeBuilder->new_from_content($somecontent);
      > >
      > > #this is where I get lost:
      > > my @links = $p->look_down(
      > > _tag => 'a',
      > > href => qr{^
      > > \ Qhttp://foo/\ <http://foo/%5C> E \ w+ $}x
      > > );
      > >
      > >
      > > Any good places to get documentation like this? For any module like
      > > XML::RSS and so on?
      > >
      > > Thanks much,
      > >
      > > David
      > >
      > >
      > >
      > > [Non-text portions of this message have been removed]
      > >
      > >
      > >
      > > Unsubscribing info is here:
      > > http://help.yahoo.com/help/us/groups/groups-32.html
      > >
      > >
      > > ________________________________
      > > YAHOO! GROUPS LINKS
      > >
      > > Visit your group "perl-beginner" on the web.
      > >
      > > To unsubscribe from this group, send an email to:
      > > perl-beginner-unsubscribe@yahoogroups.com
      > >
      > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
      > > To unsubscribe from this group, send an email to:
      > > perl-beginner-unsubscribe@yahoogroups.com
      > >
      > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
      > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
      > > ________________________________
      > >
      >
      >
      > --
      > "...Quoth the penguin, 'pipe grep more.'"
      >
      > Rob Wiltbank
      > Lackey@Large
      >
      >
      > Unsubscribing info is here:
      > http://help.yahoo.com/help/us/groups/groups-32.html
      >
      >
      >
      > SPONSORED LINKS
      > Basic programming
      > language C programming
      > language Computer programming
      > languages
      > The c programming language C++
      > programming language List of
      > programming
      > languages
      >
      > YAHOO! GROUPS LINKS
      >
      > Visit your group "perl-beginner" on the web.
      > To unsubscribe from this group, send an email to:
      > perl-beginner-unsubscribe@yahoogroups.com
      > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
      >
      >
      >
      >
      >
      >
      >
      > [Non-text portions of this message have been removed]
      >
      >
      >
      > Unsubscribing info is here:
      > http://help.yahoo.com/help/us/groups/groups-32.html
      >
      >
      >
      > SPONSORED LINKS
      > Basic programming language<http://groups.yahoo.com/gads?t=ms&k=Basic+programming+language&w1=Basic+programming+language&w2=C+programming+language&w3=Computer+programming+languages&w4=The+c+programming+language&w5=C+++programming+language&w6=List+of+programming+languages&c=6&s=193&.sig=aLlETYEcZKW67uFZnuZPPw> C
      > programming language<http://groups.yahoo.com/gads?t=ms&k=C+programming+language&w1=Basic+programming+language&w2=C+programming+language&w3=Computer+programming+languages&w4=The+c+programming+language&w5=C+++programming+language&w6=List+of+programming+languages&c=6&s=193&.sig=n4wEVXDpIBKogo8e_G77cw> Computer
      > programming languages<http://groups.yahoo.com/gads?t=ms&k=Computer+programming+languages&w1=Basic+programming+language&w2=C+programming+language&w3=Computer+programming+languages&w4=The+c+programming+language&w5=C+++programming+language&w6=List+of+programming+languages&c=6&s=193&.sig=KFl1CeQi7jrKmsK4WD6ygQ> The
      > c programming language<http://groups.yahoo.com/gads?t=ms&k=The+c+programming+language&w1=Basic+programming+language&w2=C+programming+language&w3=Computer+programming+languages&w4=The+c+programming+language&w5=C+++programming+language&w6=List+of+programming+languages&c=6&s=193&.sig=lU9w7-4UlGPB4LjDy84c2Q> C++
      > programming language<http://groups.yahoo.com/gads?t=ms&k=C+++programming+language&w1=Basic+programming+language&w2=C+programming+language&w3=Computer+programming+languages&w4=The+c+programming+language&w5=C+++programming+language&w6=List+of+programming+languages&c=6&s=193&.sig=dtKotXT1Ne2N9AO_aEbPFQ> List
      > of programming languages<http://groups.yahoo.com/gads?t=ms&k=List+of+programming+languages&w1=Basic+programming+language&w2=C+programming+language&w3=Computer+programming+languages&w4=The+c+programming+language&w5=C+++programming+language&w6=List+of+programming+languages&c=6&s=193&.sig=0shmxLBHwrZWcSjC3QvZAA>
      >
      > ------------------------------
      > YAHOO! GROUPS LINKS
      >
      >
      > - Visit your group "perl-beginner<http://groups.yahoo.com/group/perl-beginner>"
      > on the web.
      >
      > - To unsubscribe from this group, send an email to:
      > perl-beginner-unsubscribe@yahoogroups.com<perl-beginner-unsubscribe@yahoogroups.com?subject=Unsubscribe>
      >
      > - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      > Service <http://docs.yahoo.com/info/terms/>.
      >
      >
      > ------------------------------
      >



      --
      "...Quoth the penguin, 'pipe grep more.'"

      Rob Wiltbank
      Lackey@Large


      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.