Help for this page

Select Code to Download


  1. or download this
    my $html = HTML::TagParser->new($line);
    my @elem = $html->getElementsByClassName($class);
    
  2. or download this
    my $html = HTML::TagParser->new($line);
    my $body = $html->getElementById($id);
    my @elem = $body->getElementsByClassName($class);
    
  3. or download this
    my $html = HTML::TagParser->new($line);
    my $body = $html->getElementById($id);
    $body = $body->subTree(); # $body is now a new HTML::TagParser object
    my @elem = $body->getElementsByClassName($class);