lxml.html.html5parser.XHTMLParser

Package lxml :: Package html :: Module html5parser :: Class XHTMLParser |
[hide private]
[frames] | no frames]

# Class XHTMLParser

source code

                         object --+
                                  |
    html5lib.html5parser.HTMLParser --+
                                      |
    html5lib.liberalxmlparser.XMLParser --+
                                          |
      html5lib.liberalxmlparser.XHTMLParser --+
                                              |
                                             XHTMLParser

An html5lib XHTML Parser with lxml as tree.

Instance Methods | [hide private]
__init__(self, strict=False) strict - raise an exception when a parse error is encountered | source code
Inherited from `html5lib.liberalxmlparser.XHTMLParser`: `normalizeToken` Inherited from `html5lib.liberalxmlparser.XMLParser`: `parseRCDataCData` Inherited from `html5lib.liberalxmlparser.XMLParser` (private): `_parse` Inherited from `html5lib.html5parser.HTMLParser`: `normalizedTokens`, `parse`, `parseError`, `parseFragment`, `resetInsertionMode` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, strict=False) (Constructor) | source code
strict - raise an exception when a parse error is encountered tree - a treebuilder class controlling the type of tree that will be returned. Built in treebuilders can be accessed through html5lib.treebuilders.getTreeBuilder(treeType) tokenizer - a class that provides a stream of tokens to the treebuilder. This may be replaced for e.g. a sanitizer which converts some tags to text Overrides: object.__init__ (inherited documentation)