summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2008-05-17 22:02:32 (GMT)
committerFred Drake <fdrake@acm.org>2008-05-17 22:02:32 (GMT)
commit3c50ea4303ad58785e7f5058cdd353c6d0140ee4 (patch)
tree127214cdbbaac0fad36eb75b08e7868a666283c8 /Doc
parent9b020c784c3a1ec3d412bca1ffed2d24232b0a54 (diff)
downloadcpython-3c50ea4303ad58785e7f5058cdd353c6d0140ee4.zip
cpython-3c50ea4303ad58785e7f5058cdd353c6d0140ee4.tar.gz
cpython-3c50ea4303ad58785e7f5058cdd353c6d0140ee4.tar.bz2
rename HTMLParser to html.parser and htmlentitydefs to html.entities;
includes merge of trunk revision 63432
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/htmllib.rst10
-rw-r--r--Doc/library/htmlparser.rst14
2 files changed, 12 insertions, 12 deletions
diff --git a/Doc/library/htmllib.rst b/Doc/library/htmllib.rst
index e1f2447..34423a0 100644
--- a/Doc/library/htmllib.rst
+++ b/Doc/library/htmllib.rst
@@ -75,12 +75,12 @@ The module defines a parser class and an exception:
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`
@@ -147,10 +147,10 @@ additional methods and instance variables for use within tag methods.
: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 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 @@ in :mod:`sgmllib`.
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 @@ An exception is defined as well:
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 @@ Example HTML Parser Application
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):