in reply to HTML::TableExtractor and embedded columns
how about Using table tag attributes.
use Data::Dumper; use HTML::TableExtract; use Text::Table; my $content = './table.html'; my $headers = ['subhead1', 'subhead2']; #my $te = HTML::TableExtract->new(headers => $headers); my $tbl_extr = HTML::TableExtract->new(attribs => { border => 1 }); my $tbl_out = Text::Table->new(@$headers); $tbl_extr->parse_file($content); foreach my $ts ($tbl_extr->tables) { print "Table with border=1 found at ", join(',', $ts->coords), + ":\n"; foreach my $row ($ts->rows) { print " ", join(',', @$row), "\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: HTML::TableExtractor and embedded columns
by Kyshtynbai (Sexton) on Mar 17, 2014 at 19:27 UTC |