in reply to Re^2: HTML::TableExtract issues
in thread HTML::TableExtract issues

The documentation for HTML::TableExtract gives you an example using the tree option:

# Example: Extracting as an HTML::Element tree structure # Rather than extracting raw text, the html can be converted into a # tree of element objects. The HTML document is composed of # HTML::Element objects and the tables are HTML::ElementTable # structures. Using this, the contents of tables within a document ca +n # be edited in-place. use HTML::TableExtract qw(tree); $te = HTML::TableExtract->new( headers => qw(Fee Fie Foe Fum) ); $te->parse_file($html_file); $table = $te->first_table_found; $table_tree = $table->tree; $table_tree->cell(4,4)->replace_content('Golden Goose'); $table_html = $table_tree->as_HTML; $table_text = $table_tree->as_text; $document_tree = $te->tree; $document_html = $document_tree->as_HTML;

Replies are listed 'Best First'.
Re^4: HTML::TableExtract issues
by Mr Bigglesworth (Initiate) on Aug 26, 2013 at 12:24 UTC

    Hi Laurent_R

    I have been trying to get my head around the documentation for a while (about a week) now but have been really struggling with it, but starting to make some progress.

    Thank you.

    Mr Bigglesworth