(original) (raw)

Index: HTMLParser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/HTMLParser.py,v retrieving revision 1.11 diff -r1.11 HTMLParser.py 75a76,79 > Facilitates HTML parsing by providing a callback mechanism > similar to SAX parsing. To receive callbacks from the parser, > subclass HTMLParser and implement the handle_* methods. > 334a339,341 > """called when a start+end tag is encountered: > in this example, the value of tag is 'tag' and attrs is a list > of tuples: [('foo', 'bar')]""" 339a347,349 > """called when a start tag is encountered: > in this example, the value of tag is 'tag' and attrs is a list of > tuples: [('foo', 'bar')]""" 343a354 > """called when an end tag is encountered: """ 347a359,360 > """called when a character reference is encountered: { > in this example, the value of name is '123'""" 351a365,366 > """called when an entity reference is encountered: &bar;> in this example, the value of name is 'bar'""" 355a371,372 > """called when data is encountered: foo bar> in this example, the value of data is 'foo bar'""" 359a377,378 > """called when a comment is encountered: > in this example, the value of data is 'foo bar'""" 363a383,384 > """called when a declaration is encountered: > in this example, the value of decl is 'DOCTYPE foo'""" 367a389,390 > """called when a processing instruction is encountered: in this example, the value of data is 'version="1.0"'"""