-
Notifications
You must be signed in to change notification settings - Fork 299
Closed
Description
In HTMLParser.__init__, tree is a class:
html5lib-python/html5lib/html5parser.py
Lines 93 to 97 in f4646e6
| def __init__(self, tree=None, strict=False, namespaceHTMLElements=True, debug=False): | |
| """ | |
| :arg tree: a treebuilder class controlling the type of tree that will be | |
| returned. Built in treebuilders can be accessed through | |
| html5lib.treebuilders.getTreeBuilder(treeType) |
However the examples in the API docs, which also ends up in the website, uses a string
html5lib-python/html5lib/html5parser.py
Lines 105 to 109 in f4646e6
| Example: | |
| >>> from html5lib.html5parser import HTMLParser | |
| >>> parser = HTMLParser() # generates parser with etree builder | |
| >>> parser = HTMLParser('lxml', strict=True) # generates parser with lxml builder which is strict |
Metadata
Metadata
Assignees
Labels
No labels