Hello list,
I wish to parse a HTML document and put all tables found into a regular
array. All HTML tables will have rectangular configuration.
I looked into the HTML::TokeParser module for the job, but after a
frustrating hour or two I cant figure out how to do it.
This is what I want to do:
Pseudocode:
while(get_tag("table")){
while(get_tag("tr")){
$r_index++;
while(get_tag("td")){
$d_index++;
#put contents into @array at $r_index and $d_index
}
}
}
But I am not able to limit the inner loops to the span of the table or the
row only, ie get_tag("tr") will run across table barriers.
If someone could give pointers to good HTML::TokeParser tutorials or help
me with this specific problem, I would be very greatful.
Regards,
Torbj�rn Lindahl