jupe has asked for the wisdom of the Perl Monks concerning the following question:
But I can't seem to find a sensible way of doing this in Perl. With HTML::Parser I've set up start_h and end_h event handlers, but the end_h event handler isn't smart enough to know when the specific associated end tag has appeared--so if it handles a specific <div>, I can't figure out a way to only send an event on the closing of that </div> and not any embedded ones. I am sure I'm missing something simple (wrong module likely), but my brain is frazzled enough I would appreciate some guidance. Thanks!!!var elem=document.getElementsByClass('className'); for (var i=0; i<elem.length; i++) { alert(elem.innerHTML); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Parsing semi-complex HTML
by ikegami (Patriarch) on Jul 07, 2010 at 00:24 UTC | |
by duelafn (Parson) on Jul 07, 2010 at 15:57 UTC | |
by ikegami (Patriarch) on Jul 07, 2010 at 16:11 UTC | |
by Your Mother (Archbishop) on Jul 07, 2010 at 16:30 UTC | |
by ikegami (Patriarch) on Jul 07, 2010 at 16:40 UTC | |
|
Re: Parsing semi-complex HTML
by Anonymous Monk on Jul 07, 2010 at 00:37 UTC | |
|
Re: Parsing semi-complex HTML
by ikegami (Patriarch) on Jul 07, 2010 at 00:26 UTC | |
|
Re: Parsing semi-complex HTML
by Anonymous Monk on Jul 07, 2010 at 00:42 UTC |