[cgiapp] Re: [OT] HTML::Parser::PurePerl

Ron Savage ron at savage.net.au
Wed Feb 25 02:08:44 EST 2009


Hi Lyle

On Tue, 2009-02-24 at 16:12 +0000, Lyle wrote:
> Ron Savage wrote:
> > Hi Folks
> >
> > Uploaded HTML::Parser::Simple to CPAN.
> >
> > See the FAQ for why the name HTML::Parser::PurePerl was not used.
> >   
> 
> 
> Good stuff :)
> 
> Although after looking through the pod I can't see immediately how to 
> make changes to the html? Maybe a short example with a change, such as:-
> 
> my($p) = HTML::Parser::Simple -> new();
> $p -> parse('<html><input name=test></html>');
> ### Parse value into input tag test
> print $p -> result();

You override traverse().

Or, write your own, say process(), and....

$p -> parse($html);
$p -> process($p -> root() );

> Also you say:-
>     "Does this module handle all HTML pages?
>         No, never."
> 
> Have you no intentions of making this read XHTML?

I have not yet considered XHTML, but I soon will.

-- 
Ron Savage
ron at savage.net.au
http://savage.net.au/index.html




More information about the cgiapp mailing list