Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Testsuite data for html5lib, including the de-facto standard HTML parsing tests.

License

NotificationsYou must be signed in to change notification settings

html5lib/html5lib-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

html5lib is a pure-python library for parsing HTML. It is designed toconform to the Web Applications 1.0 specification, which hasformalized the error handling algorithms of popular web browsers. = Installation =html5lib is packaged with distutils. To install it use: $ python setup.py install = Tests =You may wish to check that your installation has been a success byrunning the testsuite. All the tests can be run by invokingruntests.py in the tests/ directory = Usage =Simple usage follows this pattern:import html5libf = open("mydocument.html")parser = html5lib.HTMLParser()document = parser.parse(f)By default, the returned document is a simple DOM-like structure whichcan be navigated using the .parent and .childNode attributes on eachelement. It is also possible to generate an ElementTree tree, this requires the use of the "tree" argument to the parser:from html5lib.treebuilders import etreeparser = html5lib.HTMLParser(tree=etree.TreeBuilder)Intrepid users may write their own treebuilder implementations - seehelp(html5lib.treebuilders) for more informationMore documentation is avaliable in the docstrings. = Bugs =Please report any bugs on the issue tracker:http://code.google.com/p/html5lib/issues/list = Get Involved =Contributions to code or documenation are actively encouraged. Submitpatches to the issue tracker or discuss changes on irc in the #whatwgchannel on freenode.net

About

Testsuite data for html5lib, including the de-facto standard HTML parsing tests.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors34

Languages


[8]ページ先頭

©2009-2025 Movatter.jp