HTML::DOM::Element::Table - A Perl class for representing 'table' elements in an HTML DOM tree
Version 0.058
use HTML::DOM; $doc = HTML::DOM->new; $elem = $doc->createElement('table'); $elem->tHead; $elem->tBodies->[0]; $elem->createTFoot; # etc
This class represents 'table' elements in an HTML::DOM tree. It implements the HTMLTableElement DOM interface and inherits from HTML::DOM::Element (q.v.).
In addition to those inherited from HTML::DOM::Element and its superclasses, this class implements the following DOM methods:
Each of these returns the table's corresponding element, if it exists, or an empty list otherwise.
Returns a collection of all table row elements, or a list in list context.
Returns a collection of all 'tbody' elements, or a list in list context.
These get (optionally set) the corresponding HTML attributes.
Returns the table's 'thead' element, creating it if it doesn't exist.
Deletes the table's 'thead' element.
Returns the table's 'tfoot' element, creating it if it doesn't exist.
Does what you would think.
Returns the table's 'caption' element, creating it if it doesn't exist.
Deletes the caption.
Insert a new 'tr' element at the index specified by the first argument, and returns that new row.
Deletes the row at the index specified by the first arg.
HTML::DOM
HTML::DOM::Element
HTML::DOM::Element::Caption
HTML::DOM::Element::TableColumn
HTML::DOM::Element::TableSection
HTML::DOM::Element::TR
HTML::DOM::Element::TableCell
To install HTML::DOM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::DOM
CPAN shell
perl -MCPAN -e shell install HTML::DOM
For more information on module installation, please visit the detailed CPAN module installation guide.