update references and documentation for modules in the new html package
(http://bugs.python.org/issue2882)
diff --git a/Doc/library/htmllib.rst b/Doc/library/htmllib.rst
index 96a7d08..ffaaaec 100644
--- a/Doc/library/htmllib.rst
+++ b/Doc/library/htmllib.rst
@@ -77,12 +77,12 @@
Interface definition for transforming an abstract flow of formatting events into
specific output events on writer objects.
- Module :mod:`HTMLParser`
+ Module :mod:`html.parser`
Alternate HTML parser that offers a slightly lower-level view of the input, but
is designed to work with XHTML, and does not implement some of the SGML syntax
not used in "HTML as deployed" and which isn't legal for XHTML.
- Module :mod:`htmlentitydefs`
+ Module :mod:`html.entities`
Definition of replacement text for XHTML 1.0 entities.
Module :mod:`sgmllib`
@@ -149,10 +149,10 @@
:meth:`save_bgn` will raise a :exc:`TypeError` exception.
-:mod:`htmlentitydefs` --- Definitions of HTML general entities
-==============================================================
+:mod:`html.entities` --- Definitions of HTML general entities
+=============================================================
-.. module:: htmlentitydefs
+.. module:: html.entities
:synopsis: Definitions of HTML general entities.
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
diff --git a/Doc/library/htmlparser.rst b/Doc/library/htmlparser.rst
index 85a38fb..ee3e1f2 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.
@@ -22,7 +22,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.
@@ -92,8 +92,8 @@
``handle_starttag('a', [('href', 'http://www.cwi.nl/')])``.
.. versionchanged:: 2.6
- All entity references from htmlentitydefs are now replaced in the attribute
- values.
+ All entity references from :mod:`html.entities` are now replaced in the
+ attribute values.
.. method:: HTMLParser.handle_startendtag(tag, attrs)
@@ -171,7 +171,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):