develooper Front page | perl.libwww | Postings from March 2001

TreeBuilder and LWP object

Thread Next
From:
=?iso-8859-1?q?I....AM.....I?=
Date:
March 18, 2001 08:23
Subject:
TreeBuilder and LWP object
Message ID:
20010318162320.29939.qmail@web1206.mail.yahoo.com
hi all,
I'm trying to parse some html document from LWP object
like so;

.
.
$ua = LWP::UserAgent->new();
$req = HTTP::Request->new( GET
                  => 'http://some.www.url.com' );
$res = $ua->request($req);

if ( $res->is_success ) {
    kor($res);
}
.
.
.
sub kor {
    my ($self) = @_;
    my $html = $self->content;
    my $tree = HTML::TreeBuilder->new();
    $tree->parse($html);
    $tree->eof;
    my $title = $tree->look_down( '_tag', 'title' );
    #some more code ....
}

but unfortunately I get this;

Can't find '_hparser_xs_state' element in HTML::Parser
hash at pase_html.pl line 25.

what does it mean??

thanks in advance


______________________________________________________
Do You Yahoo!?
Få en gratis @yahoo.dk-adresse på http://mail.yahoo.dk

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About