rename HTMLParser to html.parser and htmlentitydefs to html.entities;
includes merge of trunk revision 63432
diff --git a/Doc/library/htmlparser.rst b/Doc/library/htmlparser.rst
index 5cfe04e..4bfb287 100644
--- a/Doc/library/htmlparser.rst
+++ b/Doc/library/htmlparser.rst
@@ -1,8 +1,8 @@
-:mod:`HTMLParser` --- Simple HTML and XHTML parser
-==================================================
+:mod:`html.parser` --- Simple HTML and XHTML parser
+===================================================
-.. module:: HTMLParser
+.. module:: html.parser
:synopsis: A simple parser that can handle HTML and XHTML.
@@ -18,7 +18,7 @@
The :class:`HTMLParser` class is instantiated without arguments.
- An HTMLParser instance is fed HTML data and calls handler functions when tags
+ An :class:`HTMLParser` instance is fed HTML data and calls handler functions when tags
begin and end. The :class:`HTMLParser` class is meant to be overridden by the
user to provide a desired behavior.
@@ -87,8 +87,8 @@
HREF="http://www.cwi.nl/">``, this method would be called as
``handle_starttag('a', [('href', 'http://www.cwi.nl/')])``.
- All entity references from htmlentitydefs are replaced in the attribute
- values.
+ All entity references from :mod:`html.entities` are replaced in the
+ attribute values.
.. method:: HTMLParser.handle_startendtag(tag, attrs)
@@ -166,7 +166,7 @@
As a basic example, below is a very basic HTML parser that uses the
:class:`HTMLParser` class to print out tags as they are encountered::
- from HTMLParser import HTMLParser
+ from html.parser import HTMLParser
class MyHTMLParser(HTMLParser):