Chady has asked for the wisdom of the Perl Monks concerning the following question:
Ok, so english not being my main language has a lot to do with the fact that I first mistook parse to paste, but that's another story...
I totally understand now what is the meaning of parse, but when I tried to put it at work, it cracked.
I was trying to match some tags from inside an HTML document, so I thought, Ok, what's better than HTML::...s, looked at HTML::Parser, and here is something from the perldoc:
The `HTML::Parser' will tokenize an HTML document when the parse() method is called by invoking various callback methods. The document to be parsed can be supplied in arbitrary chunks.
So? what do I do next? I know that it has now parsed it and understood it.. but what do I get?
Let's say I want to fetch a remote html file using LWP::Simple then search the file for the occurence of a certain criteria <h3>foo</h3> and then get everything after that that is in between <EM> tags until I reach an <HR>. I don't think it's hard to do, but I'm not familiar with the way I need to do this, cause I'm not understanding what to do with the parser.
anyone ready to give me a bit of explanation on that?
--Chady
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(ichimunki) Re: Parse... then what? (HTML Parsing problems)
by ichimunki (Priest) on Aug 18, 2001 at 15:51 UTC | |
|
Re: Parse... then what? (HTML Parsing problems)
by THRAK (Monk) on Aug 20, 2001 at 16:27 UTC |