def load(self):
self._validate()<EOL>self._logger.logging_load()<EOL>self.encoding = get_file_encoding(self.source, self.encoding)<EOL>with io.open(self.source, "<STR_LIT:r>", encoding=self.encoding) as fp:<EOL><INDENT>formatter = HtmlTableFormatter(fp.read(), self._logger)<EOL><DEDENT>formatter.accept(self)<EOL>return formatter.to_table_data()<EOL>
Extract tabular data as |TableData| instances from HTML table tags in
a HTML file.
|load_source_desc_file|

:return:
    Loaded table data iterator.
    |load_table_name_desc|

    ===================  ==============================================
    Format specifier     Value after the replacement
    ===================  ==============================================
    ``%(filename)s``     |filename_desc|
    ``%(title)s``        ``<title>`` tag value of the HTML.
    ``%(key)s``          | This replaced to:
                         | **(1)** ``id`` attribute of the table tag
                         | **(2)** ``%(format_name)s%(format_id)s``
                         | if ``id`` attribute not present in the
                         | table tag.
    ``%(format_name)s``  ``"html"``
    ``%(format_id)s``    |format_id_desc|
    ``%(global_id)s``    |global_id|
    ===================  ==============================================
:rtype: |TableData| iterator
:raises pytablereader.DataError:
    If the HTML data is invalid or empty.

.. note::

    Table tag attributes ignored with loaded |TableData|.