NAME

Data::TableReader::Decoder::HTML - Access the tables of an HTML document

DESCRIPTION

This decoder iterates the <TR> tags of the <TABLE>s of an HTML file.

METHODS

parse

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.

iterator

  my $iterator= $decoder->iterator;

Return an iterator which returns each row of the table as an arrayref. The iterator supports $i->next_dataset to move to the next table element.

AUTHOR

Michael Conrad <mike@nrdvana.net>

COPYRIGHT AND LICENSE

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.