{
    "content": [
        {
            "type": "text",
            "text": "# HTML::TableExtract (perldoc)\n\n## NAME\n\nHTML::TableExtract - Perl module for extracting the content contained in tables within an HTML document, either as text or encoded element trees.\n\n## SYNOPSIS\n\n# Matched tables are returned as table objects; tables can be matched\n# using column headers, depth, count within a depth, table tag\n# attributes, or some combination of the four.\n# Example: Using column header information.\n# Assume an HTML document with tables that have \"Date\", \"Price\", and\n# \"Cost\" somewhere in a row. The columns beneath those headings are\n# what you want to extract. They will be returned in the same order as\n# you specified the headers since 'automap' is enabled by default.\nuse HTML::TableExtract;\nmy $te = HTML::TableExtract->new( headers => [qw(Date Price Cost)] );\n$te->parse($htmlstring);\n# Examine all matching tables\nforeach my $ts ($te->tables) {\nprint \"Table (\", join(',', $ts->coords), \"):\\n\";\nforeach my $row ($ts->rows) {\nprint join(',', @$row), \"\\n\";\n}\n}\n# Shorthand...top level rows() method assumes the first table found in\n# the document if no arguments are supplied.\nforeach my $row ($te->rows) {\nprint join(',', @$row), \"\\n\";\n}\n# Example: Using depth and count information.\n# Every table in the document has a unique depth and count tuple, so\n# when both are specified it is a unique table. Depth and count both\n# begin with 0, so in this case we are looking for a table (depth 2)\n# within a table (depth 1) within a table (depth 0, which is the top\n# level HTML document). In addition, it must be the third (count 2)\n# such instance of a table at that depth.\nmy $te = HTML::TableExtract->new( depth => 2, count => 2 );\n$te->parsefile($htmlfile);\nforeach my $ts ($te->tables) {\nprint \"Table found at \", join(',', $ts->coords), \":\\n\";\nforeach my $row ($ts->rows) {\nprint \"   \", join(',', @$row), \"\\n\";\n}\n}\n# Example: Using table tag attributes.\n# If multiple attributes are specified, all must be present and equal\n# for match to occur.\nmy $te = HTML::TableExtract->new( attribs => { border => 1 } );\n$te->parse($htmlstring);\nforeach my $ts ($te->tables) {\nprint \"Table with border=1 found at \", join(',', $ts->coords), \":\\n\";\nforeach my $row ($ts->rows) {\nprint \"   \", join(',', @$row), \"\\n\";\n}\n}\n# Example: Extracting as an HTML::Element tree structure\n# Rather than extracting raw text, the html can be converted into a\n# tree of element objects. The HTML document is composed of\n# HTML::Element objects and the tables are HTML::ElementTable\n# structures. Using this, the contents of tables within a document can\n# be edited in-place.\nuse HTML::TableExtract qw(tree);\nmy $te = HTML::TableExtract->new( headers => qw(Fee Fie Foe Fum) );\n$te->parsefile($htmlfile);\nmy $table = $te->firsttablefound;\nmy $tabletree = $table->tree;\n$tabletree->cell(4,4)->replacecontent('Golden Goose');\nmy $tablehtml = $tabletree->asHTML;\nmy $tabletext = $tabletree->astext;\nmy $documenttree = $te->tree;\nmy $documenthtml = $documenttree->asHTML;\n\n## DESCRIPTION\n\nHTML::TableExtract is a subclass of HTML::Parser that serves to extract the information from\ntables of interest contained within an HTML document. The information from each extracted table\nis stored in table objects. Tables can be extracted as text, HTML, or HTML::ElementTable\nstructures (for in-place editing or manipulation).\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (2 subsections)\n- **METHODS** (26 subsections)\n- **NOTES ON TREE EXTRACTION MODE** (3 subsections)\n- **REQUIRES**\n- **OPTIONALLY REQUIRES**\n- **AUTHOR**\n- **COPYRIGHT**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "HTML::TableExtract",
        "section": "",
        "mode": "perldoc",
        "summary": "HTML::TableExtract - Perl module for extracting the content contained in tables within an HTML document, either as text or encoded element trees.",
        "synopsis": "# Matched tables are returned as table objects; tables can be matched\n# using column headers, depth, count within a depth, table tag\n# attributes, or some combination of the four.\n# Example: Using column header information.\n# Assume an HTML document with tables that have \"Date\", \"Price\", and\n# \"Cost\" somewhere in a row. The columns beneath those headings are\n# what you want to extract. They will be returned in the same order as\n# you specified the headers since 'automap' is enabled by default.\nuse HTML::TableExtract;\nmy $te = HTML::TableExtract->new( headers => [qw(Date Price Cost)] );\n$te->parse($htmlstring);\n# Examine all matching tables\nforeach my $ts ($te->tables) {\nprint \"Table (\", join(',', $ts->coords), \"):\\n\";\nforeach my $row ($ts->rows) {\nprint join(',', @$row), \"\\n\";\n}\n}\n# Shorthand...top level rows() method assumes the first table found in\n# the document if no arguments are supplied.\nforeach my $row ($te->rows) {\nprint join(',', @$row), \"\\n\";\n}\n# Example: Using depth and count information.\n# Every table in the document has a unique depth and count tuple, so\n# when both are specified it is a unique table. Depth and count both\n# begin with 0, so in this case we are looking for a table (depth 2)\n# within a table (depth 1) within a table (depth 0, which is the top\n# level HTML document). In addition, it must be the third (count 2)\n# such instance of a table at that depth.\nmy $te = HTML::TableExtract->new( depth => 2, count => 2 );\n$te->parsefile($htmlfile);\nforeach my $ts ($te->tables) {\nprint \"Table found at \", join(',', $ts->coords), \":\\n\";\nforeach my $row ($ts->rows) {\nprint \"   \", join(',', @$row), \"\\n\";\n}\n}\n# Example: Using table tag attributes.\n# If multiple attributes are specified, all must be present and equal\n# for match to occur.\nmy $te = HTML::TableExtract->new( attribs => { border => 1 } );\n$te->parse($htmlstring);\nforeach my $ts ($te->tables) {\nprint \"Table with border=1 found at \", join(',', $ts->coords), \":\\n\";\nforeach my $row ($ts->rows) {\nprint \"   \", join(',', @$row), \"\\n\";\n}\n}\n# Example: Extracting as an HTML::Element tree structure\n# Rather than extracting raw text, the html can be converted into a\n# tree of element objects. The HTML document is composed of\n# HTML::Element objects and the tables are HTML::ElementTable\n# structures. Using this, the contents of tables within a document can\n# be edited in-place.\nuse HTML::TableExtract qw(tree);\nmy $te = HTML::TableExtract->new( headers => qw(Fee Fie Foe Fum) );\n$te->parsefile($htmlfile);\nmy $table = $te->firsttablefound;\nmy $tabletree = $table->tree;\n$tabletree->cell(4,4)->replacecontent('Golden Goose');\nmy $tablehtml = $tabletree->asHTML;\nmy $tabletext = $tabletree->astext;\nmy $documenttree = $te->tree;\nmy $documenthtml = $documenttree->asHTML;",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "Parser",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/Parser/3/json"
            },
            {
                "name": "TreeBuilder",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/TreeBuilder/3/json"
            },
            {
                "name": "ElementTable",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/ElementTable/3/json"
            },
            {
                "name": "perl",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/perl/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 76,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 46,
                "subsections": [
                    {
                        "name": "Extraction Modes",
                        "lines": 21
                    },
                    {
                        "name": "Advice",
                        "lines": 6
                    }
                ]
            },
            {
                "name": "METHODS",
                "lines": 5,
                "subsections": [
                    {
                        "name": "new",
                        "lines": 98
                    },
                    {
                        "name": "depths",
                        "lines": 2
                    },
                    {
                        "name": "counts",
                        "lines": 2
                    },
                    {
                        "name": "table",
                        "lines": 2
                    },
                    {
                        "name": "tables",
                        "lines": 3
                    },
                    {
                        "name": "first_table_found",
                        "lines": 3
                    },
                    {
                        "name": "current_table",
                        "lines": 3
                    },
                    {
                        "name": "tree",
                        "lines": 4
                    },
                    {
                        "name": "tables_report",
                        "lines": 4
                    },
                    {
                        "name": "tables_dump",
                        "lines": 12
                    },
                    {
                        "name": "table_state",
                        "lines": 2
                    },
                    {
                        "name": "table_states",
                        "lines": 2
                    },
                    {
                        "name": "first_table_state_found",
                        "lines": 6
                    },
                    {
                        "name": "rows",
                        "lines": 5
                    },
                    {
                        "name": "columns",
                        "lines": 5
                    },
                    {
                        "name": "row",
                        "lines": 3
                    },
                    {
                        "name": "column",
                        "lines": 3
                    },
                    {
                        "name": "cell",
                        "lines": 4
                    },
                    {
                        "name": "space",
                        "lines": 4
                    },
                    {
                        "name": "depth",
                        "lines": 2
                    },
                    {
                        "name": "count",
                        "lines": 2
                    },
                    {
                        "name": "coords",
                        "lines": 2
                    },
                    {
                        "name": "tree",
                        "lines": 3
                    },
                    {
                        "name": "hrow",
                        "lines": 4
                    },
                    {
                        "name": "column_map",
                        "lines": 5
                    },
                    {
                        "name": "lineage",
                        "lines": 5
                    }
                ]
            },
            {
                "name": "NOTES ON TREE EXTRACTION MODE",
                "lines": 12,
                "subsections": [
                    {
                        "name": "row",
                        "lines": 1
                    },
                    {
                        "name": "column",
                        "lines": 11
                    },
                    {
                        "name": "column",
                        "lines": 11
                    }
                ]
            },
            {
                "name": "REQUIRES",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "OPTIONALLY REQUIRES",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "HTML::TableExtract - Perl module for extracting the content contained in tables within an HTML\ndocument, either as text or encoded element trees.\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "# Matched tables are returned as table objects; tables can be matched\n# using column headers, depth, count within a depth, table tag\n# attributes, or some combination of the four.\n\n# Example: Using column header information.\n# Assume an HTML document with tables that have \"Date\", \"Price\", and\n# \"Cost\" somewhere in a row. The columns beneath those headings are\n# what you want to extract. They will be returned in the same order as\n# you specified the headers since 'automap' is enabled by default.\n\nuse HTML::TableExtract;\nmy $te = HTML::TableExtract->new( headers => [qw(Date Price Cost)] );\n$te->parse($htmlstring);\n\n# Examine all matching tables\nforeach my $ts ($te->tables) {\nprint \"Table (\", join(',', $ts->coords), \"):\\n\";\nforeach my $row ($ts->rows) {\nprint join(',', @$row), \"\\n\";\n}\n}\n\n# Shorthand...top level rows() method assumes the first table found in\n# the document if no arguments are supplied.\nforeach my $row ($te->rows) {\nprint join(',', @$row), \"\\n\";\n}\n\n# Example: Using depth and count information.\n# Every table in the document has a unique depth and count tuple, so\n# when both are specified it is a unique table. Depth and count both\n# begin with 0, so in this case we are looking for a table (depth 2)\n# within a table (depth 1) within a table (depth 0, which is the top\n# level HTML document). In addition, it must be the third (count 2)\n# such instance of a table at that depth.\n\nmy $te = HTML::TableExtract->new( depth => 2, count => 2 );\n$te->parsefile($htmlfile);\nforeach my $ts ($te->tables) {\nprint \"Table found at \", join(',', $ts->coords), \":\\n\";\nforeach my $row ($ts->rows) {\nprint \"   \", join(',', @$row), \"\\n\";\n}\n}\n\n# Example: Using table tag attributes.\n# If multiple attributes are specified, all must be present and equal\n# for match to occur.\n\nmy $te = HTML::TableExtract->new( attribs => { border => 1 } );\n$te->parse($htmlstring);\nforeach my $ts ($te->tables) {\nprint \"Table with border=1 found at \", join(',', $ts->coords), \":\\n\";\nforeach my $row ($ts->rows) {\nprint \"   \", join(',', @$row), \"\\n\";\n}\n}\n\n# Example: Extracting as an HTML::Element tree structure\n# Rather than extracting raw text, the html can be converted into a\n# tree of element objects. The HTML document is composed of\n# HTML::Element objects and the tables are HTML::ElementTable\n# structures. Using this, the contents of tables within a document can\n# be edited in-place.\n\nuse HTML::TableExtract qw(tree);\nmy $te = HTML::TableExtract->new( headers => qw(Fee Fie Foe Fum) );\n$te->parsefile($htmlfile);\nmy $table = $te->firsttablefound;\nmy $tabletree = $table->tree;\n$tabletree->cell(4,4)->replacecontent('Golden Goose');\nmy $tablehtml = $tabletree->asHTML;\nmy $tabletext = $tabletree->astext;\nmy $documenttree = $te->tree;\nmy $documenthtml = $documenttree->asHTML;\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "HTML::TableExtract is a subclass of HTML::Parser that serves to extract the information from\ntables of interest contained within an HTML document. The information from each extracted table\nis stored in table objects. Tables can be extracted as text, HTML, or HTML::ElementTable\nstructures (for in-place editing or manipulation).\n\nThere are currently four constraints available to specify which tables you would like to extract\nfrom a document: *Headers*, *Depth*, *Count*, and *Attributes*.\n\n*Headers*, the most flexible and adaptive of the techniques, involves specifying text in an\narray that you expect to appear above the data in the tables of interest. Once all headers have\nbeen located in a row of that table, all further cells beneath the columns that matched your\nheaders are extracted. All other columns are ignored: think of it as vertical slices through a\ntable. In addition, TableExtract automatically rearranges each row in the same order as the\nheaders you provided. If you would like to disable this, set *automap* to 0 during object\ncreation, and instead rely on the columnmap() method to find out the order in which the headers\nwere found. Furthermore, TableExtract will automatically compensate for cell span issues so that\ncolumns are really the same columns as you would visually see in a browser. This behavior can be\ndisabled by setting the *gridmap* parameter to 0. HTML is stripped from the entire textual\ncontent of a cell before header matches are attempted -- unless the *keephtml* parameter was\nenabled.\n\n*Depth* and *Count* are more specific ways to specify tables in relation to one another. *Depth*\nrepresents how deeply a table resides in other tables. The depth of a top-level table in the\ndocument is 0. A table within a top-level table has a depth of 1, and so on. Each depth can be\nthought of as a layer; tables sharing the same depth are on the same layer. Within each of these\nlayers, *Count* represents the order in which a table was seen at that depth, starting with 0.\nProviding both a *depth* and a *count* will uniquely specify a table within a document.\n\n*Attributes* match based on the attributes of the html <table> tag, for example, border widths\nor background color.\n\nEach of the *Headers*, *Depth*, *Count*, and *Attributes* specifications are cumulative in their\neffect on the overall extraction. For instance, if you specify only a *Depth*, then you get all\ntables at that depth (note that these could very well reside in separate higher- level tables\nthroughout the document since depth extends across tables). If you specify only a *Count*, then\nthe tables at that *Count* from all depths are returned (i.e., the *n*th occurrence of a table\nat each depth). If you only specify *Headers*, then you get all tables in the document\ncontaining those column headers. If you have specified multiple constraints of *Headers*,\n*Depth*, *Count*, and *Attributes*, then each constraint has veto power over whether a\nparticular table is extracted.\n\nIf no *Headers*, *Depth*, *Count*, or *Attributes* are specified, then all tables match.\n\nWhen extracting only text from tables, the text is decoded with HTML::Entities by default; this\ncan be disabled by setting the *decode* parameter to 0.\n",
                "subsections": [
                    {
                        "name": "Extraction Modes",
                        "content": "The default mode of extraction for HTML::TableExtract is raw text or HTML. In this mode,\nembedded tables are completely decoupled from one another. In this case, HTML::TableExtract is a\nsubclass of HTML::Parser:\n\nuse HTML::TableExtract;\n\nAlternatively, tables can be extracted as HTML::ElementTable structures, which are in turn\nembedded in an HTML::Element tree representing the entire HTML document. Embedded tables are not\ndecoupled from one another since this tree structure must be maintained. In this case,\nHTML::TableExtract is a subclass of HTML::TreeBuilder (itself a subclass of HTML:::Parser):\n\nuse HTML::TableExtract qw(tree);\n\nIn either case, the basic interface for HTML::TableExtract and the resulting table objects\nremains the same -- all that changes is what you can do with the resulting data.\n\nHTML::TableExtract is a subclass of HTML::Parser, and as such inherits all of its basic methods\nsuch as \"parse()\" and \"parsefile()\". During scans, \"start()\", \"end()\", and \"text()\" are\nutilized. Feel free to override them, but if you do not eventually invoke them in the SUPER\nclass with some content, results are not guaranteed.\n"
                    },
                    {
                        "name": "Advice",
                        "content": "The main point of this module was to provide a flexible method of extracting tabular information\nfrom HTML documents without relying to heavily on the document layout. For that reason, I\nsuggest using *Headers* whenever possible -- that way, you are anchoring your extraction on what\nthe document is trying to communicate rather than some feature of the HTML comprising the\ndocument (other than the fact that the data is contained in a table).\n"
                    }
                ]
            },
            "METHODS": {
                "content": "The following are the top-level methods of the HTML::TableExtract object. Tables that have\nmatched a query are actually returned as separate objects of type HTML::TableExtract::Table.\nThese table objects have their own methods, documented further below.\n\nCONSTRUCTOR",
                "subsections": [
                    {
                        "name": "new",
                        "content": "Return a new HTML::TableExtract object. Valid attributes are:\n\nheaders\nPassed as an array reference, headers specify strings of interest at the top of columns\nwithin targeted tables. They can be either strings or regular expressions (qr//). If\nthey are strings, they will eventually be passed through a non-anchored,\ncase-insensitive regular expression, so regexp special characters are allowed.\n\nThe table row containing the headers is not returned, unless \"keepheaders\" was\nspecified or you are extracting into an element tree. In either case the header row can\nbe accessed via the hrow() method from within the table object.\n\nColumns that are not beneath one of the provided headers will be ignored unless\n\"slicecolumns\" was set to 0. Columns will, by default, be rearranged into the same\norder as the headers you provide (see the *automap* parameter for more information)\n*unless* \"slicecolumns\" is 0.\n\nAdditionally, by default columns are considered what you would see visually beneath that\nheader when the table is rendered in a browser. See the \"gridmap\" parameter for more\ninformation.\n\nHTML within a header is stripped before the match is attempted, unless the \"keephtml\"\nparameter was specified and \"striphtmlonmatch\" is false.\n\ndepth\nSpecify how embedded in other tables your tables of interest should be. Top-level tables\nin the HTML document have a depth of 0, tables within top-level tables have a depth of\n1, and so on.\n\ncount\nSpecify which table within each depth you are interested in, beginning with 0.\n\nattribs\nPassed as a hash reference, attribs specify attributes of interest within the HTML\n<table> tag itself.\n\nautomap\nAutomatically applies the ordering reported by columnmap() to the rows returned by\nrows(). This only makes a difference if you have specified *Headers* and they turn out\nto be in a different order in the table than what you specified. Automap will rearrange\nthe columns in the same order as the headers appear. To get the original ordering, you\nwill need to take another slice of each row using columnmap(). *automap* is enabled by\ndefault.\n\nslicecolumns\nEnabled by default, this option controls whether vertical slices are returned from under\nheaders that match. When disabled, all columns of the matching table are retained,\nregardles of whether they had a matching header above them. Disabling this also disables\n\"automap\".\n\nkeepheaders\nDisabled by default, and only applicable when header constraints have been specified,\n\"keepheaders\" will retain the matching header row as the first row of table data when\nenabled. This option has no effect if extracting into an element tree structure. In any\ncase, the header row is accessible from the table method \"hrow()\".\n\ngridmap\nControls whether the table contents are returned as a grid or a tree. ROWSPAN and\nCOLSPAN issues are compensated for, and columns really are columns. Empty phantom cells\nare created where they would have been obscured by ROWSPAN or COLSPAN settings. This\nreally becomes an issue when extracting columns beneath headers. Enabled by default.\n\nsubtables\nExtract all tables embedded within matched tables.\n\ndecode\nAutomatically decode retrieved text with HTML::Entities::decodeentities(). Enabled by\ndefault. Has no effect if \"keephtml\" was specified or if extracting into an element\ntree structure.\n\nbrtranslate\nTranslate <br> tags into newlines. Sometimes the remaining text can be hard to parse if\nthe <br> tag is simply dropped. Enabled by default. Has no effect if *keephtml* is\nenabled or if extracting into an element tree structure.\n\nkeephtml\nReturn the raw HTML contained in the cell, rather than just the visible text. Embedded\ntables are not retained in the HTML extracted from a cell. Patterns for header matches\nmust take into account HTML in the string if this option is enabled. This option has no\neffect if extracting into an elment tree structure.\n\nstriphtmlonmatch\nWhen \"keephtml\" is enabled, HTML is stripped by default during attempts at matching\nheader strings (so if \"striphtmlonmatch\" is not enabled and \"keephtml\" is, you would\nhave to include potential HTML tags in the regexp for header matches). Stripped header\ntags are replaced with an empty string, e.g. 'hot d<em>og</em>' would become 'hot dog'\nbefore attempting a match.\n\nerrorhandle\nFilehandle where error messages are printed. STDERR by default.\n\ndebug\nPrints some debugging information to STDERR, more for higher values. If \"errorhandle\"\nwas provided, messages are printed there rather than STDERR.\n\nREGULAR METHODS\nThe following methods are invoked directly from an HTML::TableExtract object.\n"
                    },
                    {
                        "name": "depths",
                        "content": "Returns all depths that contained matched tables in the document.\n"
                    },
                    {
                        "name": "counts",
                        "content": "For a particular depth, returns all counts that contained matched tables.\n"
                    },
                    {
                        "name": "table",
                        "content": "For a particular depth and count, return the table object for the table found, if any.\n"
                    },
                    {
                        "name": "tables",
                        "content": "Return table objects for all tables that matched. Returns an empty list if no tables\nmatched.\n"
                    },
                    {
                        "name": "first_table_found",
                        "content": "Return the table state object for the first table matched in the document. Returns undef if\nno tables were matched.\n"
                    },
                    {
                        "name": "current_table",
                        "content": "Returns the current table object while parsing the HTML. Only useful if you're messing\naround with overriding HTML::Parser methods.\n"
                    },
                    {
                        "name": "tree",
                        "content": "If the module was invoked in tree extraction mode, returns a reference to the top node of\nthe HTML::Element tree structure for the entire document (which includes, ultimately, all\ntables within the document).\n"
                    },
                    {
                        "name": "tables_report",
                        "content": "Return a string summarizing extracted tables, along with their depth and count. Optionally\ntakes a $showcontent flag which will dump the extracted contents of each table as well with\ncolumns separated by $colsep. Default $colsep is ':'.\n"
                    },
                    {
                        "name": "tables_dump",
                        "content": "Same as \"tablesreport()\" except dump the information to STDOUT.\n\nstart\nend\ntext\nThese are the hooks into HTML::Parser. If you want to subclass this module and have things\nwork, you must at some point call these with content.\n\nDEPRECATED METHODS\nTables used to be called 'table states'. Accordingly, the following methods still work but have\nbeen deprecated:\n"
                    },
                    {
                        "name": "table_state",
                        "content": "Is now table()\n"
                    },
                    {
                        "name": "table_states",
                        "content": "Is now tables()\n"
                    },
                    {
                        "name": "first_table_state_found",
                        "content": "Is now firsttablefound()\n\nTABLE METHODS\nThe following methods are invoked from an HTML::TableExtract::Table object, such as those\nreturned from the \"tables()\" method.\n"
                    },
                    {
                        "name": "rows",
                        "content": "Return all rows within a matched table. Each row returned is a reference to an array\ncontaining the text, HTML, or reference to the HTML::Element object of each cell depending\nthe mode of extraction. Tables with rowspan or colspan attributes will have some cells\ncontaining undef. Returns a list or a reference to an array depending on context.\n"
                    },
                    {
                        "name": "columns",
                        "content": "Return all columns within a matched table. Each column returned is a reference to an array\ncontaining the text, HTML, or reference to HTML::Element object of each cell depending on\nthe mode of extraction. Tables with rowspan or colspan attributes will have some cells\ncontaining undef.\n"
                    },
                    {
                        "name": "row",
                        "content": "Return a particular row from within a matched table either as a list or an array reference,\ndepending on context.\n"
                    },
                    {
                        "name": "column",
                        "content": "Return a particular column from within a matched table as a list or an array reference,\ndepending on context.\n"
                    },
                    {
                        "name": "cell",
                        "content": "Return a particular item from within a matched table, whether it be the text, HTML, or\nreference to the HTML::Element object of that cell, depending on the mode of extraction. If\nthe cell was covered due to rowspan or colspan effects, will return undef.\n"
                    },
                    {
                        "name": "space",
                        "content": "The same as cell(), except in cases where the given coordinates were covered due to rowspan\nor colspan issues, in which case the content of the covering cell is returned rather than\nundef.\n"
                    },
                    {
                        "name": "depth",
                        "content": "Return the depth at which this table was found.\n"
                    },
                    {
                        "name": "count",
                        "content": "Return the count for this table within the depth it was found.\n"
                    },
                    {
                        "name": "coords",
                        "content": "Return depth and count in a list.\n"
                    },
                    {
                        "name": "tree",
                        "content": "If the module was invoked in tree extraction mode, this accessor provides a reference to the\nHTML::ElementTable structure encompassing the table.\n"
                    },
                    {
                        "name": "hrow",
                        "content": "Returns the header row as a list when headers were specified as a constraint. If\n\"keepheaders\" was specified initially, this is equivalent to the first row returned by the\n\"rows()\" method.\n"
                    },
                    {
                        "name": "column_map",
                        "content": "Return the order (via indices) in which the provided headers were found. These indices can\nbe used as slices on rows to either order the rows in the same order as headers or restore\nthe rows to their natural order, depending on whether the rows have been pre-adjusted using\nthe *automap* parameter.\n"
                    },
                    {
                        "name": "lineage",
                        "content": "Returns the path of matched tables that led to matching this table. The path is a list of\narray refs containing depth, count, row, and column values for each ancestor table involved.\nNote that corresponding table objects will not exist for ancestral tables that did not match\nspecified constraints.\n"
                    }
                ]
            },
            "NOTES ON TREE EXTRACTION MODE": {
                "content": "As mentioned above, HTML::TableExtract can be invoked in 'tree' mode where the resulting HTML\nand extracted tables are encoded in HTML::Element tree structures:\n\nuse HTML::TableExtract 'tree';\n\nThere are a number of things to take note of while using this mode. The entire HTML document is\nencoded into an HTML::Element tree. Each table is part of this structure, but nevertheless is\ntracked separately via an HTML::ElementTable structure, which is a specialized form of\nHTML::Element tree.\n\nThe HTML::ElementTable objects are accessible by invoking the tree() method from within each\ntable object returned by HTML::TableExtract. The HTML::ElementTable objects have their own",
                "subsections": [
                    {
                        "name": "row",
                        "content": ""
                    },
                    {
                        "name": "column",
                        "content": "For example, the row() method from HTML::ElementTable will provide a reference to a 'glob' of\nall the elements in that row. Actions (such as setting attributes) performed on that row\nreference will affect all elements within that row. On the other hand, the row() method from the\nHTML::TableExtract::Table object will return an array (either by reference or list, depending on\ncontext) of the contents of each cell within the row. In tree mode, the content is represented\nby individual references to each cell -- these are references to the same HTML::Element objects\nthat reside in the HTML::Element tree.\n\nThe cell() methods provided in both cases will therefore return references to the same object.\nThe exception to this is when a 'cell' in the table grid was originally 'covered' due to rowspan\nor colspan issues -- in this case the cell content will be undef. Likewise, the row() or"
                    },
                    {
                        "name": "column",
                        "content": "containing a mixture of object references and undefs. If you're going to be doing lots of\nmanipulation of the table elements, it might be more efficient to access them via the methods\nprovided by the HTML::ElementTable object instead. See HTML::ElementTable for more information\non how to manipulate those objects.\n\nAn alternative to the cell() method in HTML::TableExtract::Table is the space() method. It is\nlargely similar to cell(), except when given coordinates of a cell that was covered due to\nrowspan or colspan effects, it will return the contents of the cell that was covering that space\nrather than undef. So if, for example, cell (0,0) had a rowspan of 2 and colspan of 2, cell(1,1)\nwould return undef and space(1,1) would return the same content as cell(0,0) or space(0,0).\n"
                    }
                ]
            },
            "REQUIRES": {
                "content": "HTML::Parser(3), HTML::Entities(3)\n",
                "subsections": []
            },
            "OPTIONALLY REQUIRES": {
                "content": "HTML::TreeBuilder(3), HTML::ElementTable(3)\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Matthew P. Sisk, <sisk@mojotoad.com>\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright (c) 2000-2017 Matthew P. Sisk. All rights reserved. All wrongs revenged. This program\nis free software; you can redistribute it and/or modify it under the same terms as Perl itself.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "HTML::Parser(3), HTML::TreeBuilder(3), HTML::ElementTable(3), perl(1).\n",
                "subsections": []
            }
        }
    }
}