Seixon has asked for the wisdom of the Perl Monks concerning the following question:
, and I'm currently reading it with:<table border=0 cellspacing=2 width=100%> ... <tr> <td class=td1 id=centered valign=top><A HREF=http://SOME_LINK>1 </ +A></td> <td class=td1 valign=top> <script language="javascript"> var recordLink="<A HREF=SOME_LINK>1 </A>"; recordLink = recordLink.substring(0, recordLink.indexOf(">")); document.write(recordLink); document.write(">"); </script> SOME_TEXT</a></td> <!-- <td class=td1 valign=top>SOME_DATA</td> --> </tr>
The problem with this is that I have no (easy) control over checking whether there actually exist a "comment" part together with the link (contained in the "script"-tag). So I'm reading both the arrays of data together, without knowing whether they have the same number of elements, or even if one element in "comments" is paired with the element in the same position in "lnk_details".my @comments = $tree->look_down ('_tag', '~comment'); my @lnk_details = $tree->look_down ('_tag', 'script');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using HTML::TreeBuilder to extract sections spanning multiple tags
by metaperl (Curate) on Feb 03, 2005 at 03:37 UTC | |
by Seixon (Initiate) on Feb 03, 2005 at 22:02 UTC |