Home | Trees | Indices | Help |
|
---|
|
markupbase.ParserBase --+ | HTMLParser.HTMLParser --+ | object --+ | HTMLParser
Parser for HTML input based on the Python HTMLParser module.
This class provides the same interface for generating stream events as XMLParser, and attempts to automatically balance tags.
The parsing is initiated by iterating over the parser object:
>>> parser = HTMLParser(StringIO('<UL compact><LI>Foo</UL>')) >>> for kind, data, pos in parser: ... print('%s %s' % (kind, data)) START (QName('ul'), Attrs([(QName('compact'), u'compact')])) START (QName('li'), Attrs()) TEXT Foo END li END ul
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from |
Class Variables | |
Inherited from |
Properties | |
Inherited from |
Method Details |
|
|
|
|
|
|
|
|
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Apr 22 14:10:36 2010 | http://epydoc.sourceforge.net |