23 Aug 2021 20:45:07 UTC
- Distribution: Data-TableReader-Decoder-HTML
- Module version: 0.012
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (270 / 0 / 0)
- KwaliteeBus factor: 2
- 82.04% Coverage
- License: perl_5
- Activity24 month
- Download (12.43KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionNERDVANA Michael Conrad
Data::TableReader::Decoder::HTML - Access the tables of an HTML document
This decoder iterates the <TR> tags of the <TABLE>s of an HTML file.
Unfortunately, I'm not aware of any HTML parsers that properly parse a stream on demand rather than using callbacks, so this module simply parses all the HTML up-front and iterates the perl data structure. This would be a problem if you have more HTML than can fit into memory comfortably. Buf if that's the case, you have bigger problems ;-)
This method is called automatically the first time you invoke the iterator. You might choose to call it earlier in order to report errors better.
my $iterator= $decoder->iterator;
Return an iterator which returns each row of the table as an arrayref. The iterator supports
$i->next_datasetto move to the next table element.
Michael Conrad <email@example.com>
This software is copyright (c) 2021 by Michael Conrad.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Module Install Instructions
To install Data::TableReader::Decoder::HTML, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Data::TableReader::Decoder::HTML
For more information on module installation, please visit the detailed CPAN module installation guide.