diff options
author | Fred Drake <fdrake@acm.org> | 2008-05-17 21:14:05 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2008-05-17 21:14:05 (GMT) |
commit | cb51d84214ed07268338392abef986b9a56d0141 (patch) | |
tree | 474b5ec5794e8e97953df73059c55d78cc2df631 /Doc/library/htmlparser.rst | |
parent | 91ae2502739ecfcc7a8a013473553224b8387521 (diff) | |
download | cpython-cb51d84214ed07268338392abef986b9a56d0141.zip cpython-cb51d84214ed07268338392abef986b9a56d0141.tar.gz cpython-cb51d84214ed07268338392abef986b9a56d0141.tar.bz2 |
update references and documentation for modules in the new html package
(http://bugs.python.org/issue2882)
Diffstat (limited to 'Doc/library/htmlparser.rst')
-rw-r--r-- | Doc/library/htmlparser.rst | 14 |
1 files changed, 7 insertions, 7 deletions
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 @@ 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. @@ -92,8 +92,8 @@ An exception is defined as well: ``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 @@ 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): |