talexb has asked for the wisdom of the Perl Monks concerning the following question:
I'm looking into a couple of different solutions for a problem, and one solution involves using an imaginary module called DBD::HTML::Table to load up a web page containing a big table. It would be smart enough to look at the top row for the column names, and the first column for each row's index value.
I've just had a stroll through http://metacpan.org, and I didn't see anything like that. Is it cunningly hidden, or does it not exist at all?
Update: Thanks for all of your thoughtful replies. I had a look at the HTML that was being generated by our internal CGI, and found that it was really, really easy to just write a very simple parser. Each opening and closing tr was on a line by itself, and t[dh] elements were either on a line by themselves (open, element, close) or they were in an easily grabbable format (open, elements, and close each on their own separate lines).
I understand that my initial question was vague -- I was still working out what my solution might look like. I now have a much better idea of what the process is going to look like. Ideally, it's going to be something that will be as automated as possible. Sorry if this all sounds vague, it's work related, so I need to be a little circumspect about how I describe the problem. :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Looking for something like DBD::HTML::Table
by Tux (Canon) on Feb 27, 2021 at 09:12 UTC | |
|
Re: Looking for something like DBD::HTML::Table
by marto (Cardinal) on Feb 26, 2021 at 21:24 UTC | |
|
Re: Looking for something like DBD::HTML::Table
by no longer just digit (Beadle) on Feb 26, 2021 at 23:02 UTC | |
by talexb (Chancellor) on Feb 27, 2021 at 17:17 UTC | |
|
Re: Looking for something like DBD::HTML::Table
by Fletch (Bishop) on Feb 26, 2021 at 21:41 UTC | |
|
Re: Looking for something like DBD::HTML::Table
by erix (Prior) on Feb 27, 2021 at 08:37 UTC | |
|
Re: Looking for something like DBD::HTML::Table
by LanX (Saint) on Feb 26, 2021 at 21:31 UTC |