Lines Matching +full:w3c +full:- +full:sgml +full:- +full:lib
1 :mod:`html.parser` --- Simple HTML and XHTML parser
7 **Source code:** :source:`Lib/html/parser.py`
13 --------------
16 parsing text files formatted in HTML (HyperText Mark-up Language) and XHTML.
31 This parser does not check that end tags match start tags or call the end-tag
42 -------------------------------
66 .. code-block:: none
83 ----------------------------
97 Force processing of all buffered data as if it were followed by an end-of-file
118 deployed" or for re-generating input with minimal changes (whitespace between
154 XHTML-style empty tag (``<img ... />``). This method may be overridden by
184 This method is called when a comment is encountered (e.g. ``<!--comment-->``).
186 For example, the comment ``<!-- comment -->`` will cause this method to be
190 sent to this method, so, for ``<!--[if IE 9]>IE9-specific content<![endif]-->``,
191 this method will receive ``'[if IE 9]>IE9-specific content<![endif]'``.
213 The :class:`HTMLParser` class uses the SGML syntactic rules for processing
227 .. _htmlparser-examples:
230 --------
271 >>> parser.feed('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" '
273 … Decl : DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"
277 >>> parser.feed('<img src="python-logo.png" alt="The Python logo">')
279 attr: ('src', 'python-logo.png')
305 >>> parser.feed('<!-- a comment -->'
306 ... '<!--[if IE 9]>IE-specific content<![endif]-->')
308 Comment : [if IE 9]>IE-specific content<![endif]