John J Lee wrote:
On Mon, 14 Jul 2003, Octavian Rasnita wrote:
[...]
After downloading an HTML page, what modules can I use to read the cell 4
from the fifth row of a table, if that table is placed in another table in
the cell 2 of the row 3?
[...]
http://theoryx5.uwinnipeg.ca/CPAN/data/HTML-TableExtract/HTML/TableExtract.html
It *looks* easy to use (I've never used it, so don't believe me). It has
some terribly clever declarative ways of specifying which bits of which
table you want, but hopefully you can ignore those. :-)
A quick CPAN search turned up these, which I've never looked at:
HTML::TableParser
HTML::TableContentParser
John
I tried HTML::TableExtract and it was nice but didn't handle nested
tables the way I wanted (returned data structures rather than the
simple contents of the cells). Turned out that HTML::TreeBuilder was
a better fit for what I wanted. Find the root node of the nested
table I wanted, iterate over its neighbors and grab the text from the
tagged cell (the server was kind enough to use some strange css that
helped mark what I wanted).
--
In Reach Technology: http://inreachtech.net/
Robert G. Werner
[EMAIL PROTECTED]
Tel: 559.304.5122
2001/9/11
Bloom's Seventh Law of Litigation:
The judge's jokes are always funny.