diff options
Diffstat (limited to 'Doc/library/htmlparser.rst')
-rw-r--r-- | Doc/library/htmlparser.rst | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Doc/library/htmlparser.rst b/Doc/library/htmlparser.rst index a5c185c..7b0ce03 100644 --- a/Doc/library/htmlparser.rst +++ b/Doc/library/htmlparser.rst @@ -148,10 +148,18 @@ An exception is defined as well: .. method:: HTMLParser.handle_decl(decl) - Method called when an SGML declaration is read by the parser. The *decl* - parameter will be the entire contents of the declaration inside the ``<!``...\ - ``>`` markup. It is intended to be overridden by a derived class; the base - class implementation does nothing. + Method called when an SGML ``doctype`` declaration is read by the parser. + The *decl* parameter will be the entire contents of the declaration inside + the ``<!...>`` markup. It is intended to be overridden by a derived class; + the base class implementation does nothing. + + +.. method:: HTMLParser.unknown_decl(data) + + Method called when an unrecognized SGML declaration is read by the parser. + The *data* parameter will be the entire contents of the declaration inside + the ``<!...>`` markup. It is sometimes useful to be be overridden by a + derived class; the base class implementation throws an :exc:`HTMLParseError`. .. method:: HTMLParser.handle_pi(data) |