
XML::Filter::TableWrapper - Wrap a table's cells in to a certain number of rows

use XML::Filter::TableWrapper;
use XML::SAX::Machines qw( Pipeline );
## Ouput a table with 5 rows, the last row having 3 cells:
Pipeline(
XML::Filter::TableWrapper->new(
Columns => 3, # The default is 5
),
\*STDOUT,
)->parse_string( "<table>" . "<td/>" x 23 . "</table" );

Takes a list of elements and inserts (by default) <tr>...</tr> elements to make an table with a specified number of columns (5 by default). By default, it assumes that the container element is named "{}table" (the "{}" means it is not namespaced), but this can be changed:
XML::Filter::TableWrapper->new(
ListTags => "{$my_ns}rows",
Columns => 3,
);
for instance.

These can be read as possible future features:
ListTags => {
"{}ul" => {
TableTag => "{}table",
RowTag => "{}tr",
CellTag => "{}td",
},
}
$h->Columns( 1024 );
my $columns = $h->Columns;
Set/get the number of columns to wrap to.