Lines Matching +full:w3c +full:- +full:sgml +full:- +full:lib
2 :mod:`HTMLParser` --- Simple HTML and XHTML parser
21 **Source code:** :source:`Lib/HTMLParser.py`
23 --------------
26 parsing text files formatted in HTML (HyperText Mark-up Language) and XHTML.
27 Unlike the parser in :mod:`htmllib`, this parser is not based on the SGML parser
41 match start tags or call the end-tag handler for elements which are closed
57 -------------------------------
83 .. code-block:: none
100 ----------------------------
115 Force processing of all buffered data as if it were followed by an end-of-file
136 deployed" or for re-generating input with minimal changes (whitespace between
173 XHTML-style empty tag (``<img ... />``). This method may be overridden by
201 This method is called when a comment is encountered (e.g. ``<!--comment-->``).
203 For example, the comment ``<!-- comment -->`` will cause this method to be
207 sent to this method, so, for ``<!--[if IE 9]>IE9-specific content<![endif]-->``,
208 this method will receive ``'[if IE 9]>IE9-specific content<![endif]'``.
229 The :class:`.HTMLParser` class uses the SGML syntactic rules for processing
243 .. _htmlparser-examples:
246 --------
287 >>> parser.feed('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" '
289 … Decl : DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"
293 >>> parser.feed('<img src="python-logo.png" alt="The Python logo">')
295 attr: ('src', 'python-logo.png')
321 >>> parser.feed('<!-- a comment -->'
322 ... '<!--[if IE 9]>IE-specific content<![endif]-->')
324 Comment : [if IE 9]>IE-specific content<![endif]