File tree 1 file changed +2
-14
lines changed
1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -18,25 +18,13 @@ runtests.py in the tests/ directory
18
18
Simple usage follows this pattern:
19
19
20
20
import html5lib
21
-
22
21
f = open("mydocument.html")
23
-
24
22
parser = html5lib.HTMLParser()
25
23
document = parser.parse(f)
26
24
27
- By default, the returned document is a simple DOM-like structure which
28
- can be navigated using the .parent and .childNode attributes on each
29
- element.
30
-
31
- It is also possible to generate an ElementTree tree, this requires the use of the "tree" argument to the parser:
32
-
33
- from html5lib.treebuilders import etree
34
- parser = html5lib.HTMLParser(tree=etree.TreeBuilder)
35
-
36
- Intrepid users may write their own treebuilder implementations - see
37
- help(html5lib.treebuilders) for more information
38
25
39
- More documentation is avaliable in the docstrings.
26
+ More documentation is avaliable in the docstrings or from
27
+ http://code.google.com/p/html5lib/wiki/UserDocumentation
40
28
41
29
= Bugs =
42
30
You can’t perform that action at this time.
0 commit comments