commit | d25097834d650cc38de9bc94d3ee6d21e09c4def | [log] [tgz] |
---|---|---|
author | Nate Bosch <nbosch1@gmail.com> | Wed Oct 14 14:07:53 2020 -0700 |
committer | GitHub <noreply@github.com> | Wed Oct 14 14:07:53 2020 -0700 |
tree | 69ded6848c70ad513885605b3493436f3555b59e | |
parent | ee5f00d05673c68c11844b5a83b0c1db1f2697c0 [diff] |
Drop unused lastPhase and beforeRcDataPhase fields (#137) These fields are unused in both this library and the python library from which it was transliterated. The `lastPhase` was later named to `originalPhase` but not all references were cleaned up which leaves one remaining assignment to null. `beforeRcDataPhase` was unused in the commit which introduced it and never assigned an interesting value or read the field.
This is a pure Dart HTML5 parser. It's a port of html5lib from Python.
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.