commit | ad9747855ff97238632ecc30bfddbb683e495cd8 | [log] [tgz] |
---|---|---|
author | Kevin Moore <kevmoo@google.com> | Mon Mar 04 09:22:29 2019 -0800 |
committer | Kevin Moore <kevmoo@users.noreply.github.com> | Mon Mar 04 09:31:06 2019 -0800 |
tree | 0bcef541af123ec43d915d8d58ac8eb6799a2ab7 | |
parent | c3c1575f82ca50a694e824227cc0f57f158173b7 [diff] |
Fixes to readme and pubspec, prepare for 0.13.4+1
This is a pure Dart html5 parser. It‘s a port of html5lib from Python. Since it’s 100% Dart you can use it safely from a script or server side app.
(Formerly known as package:html5lib
.)
Parsing HTML is easy!
import 'package:html/parser.dart' show parse; import 'package:html/dom.dart'; main() { var document = parse( '<body>Hello world! <a href="www.html5rocks.com">HTML5 rocks!'); print(document.outerHtml); }
You can pass a String or list of bytes to parse
. There's also parseFragment
for parsing a document fragment, and HtmlParser
if you want more low level control.