Clone this repo:
  1. 2599afe Refactor some utilities (#115) by Nate Bosch · 8 weeks ago master
  2. 083a36c Fix newly enforced package:pedantic lints (#111) by Nate Bosch · 8 months ago
  3. 1905ad2 Bump version in pubspec in preparation to publish (#110) by Nicholas Shahan · 10 months ago 0.14.0+3
  4. 2b392a4 Fix spans generated for HTML with higher-plane unicode characters (#109) by cvolzke4 · 11 months ago
  5. d37f588 fix lint (#108) by Kevin Moore · 1 year, 1 month ago

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="">HTML5 rocks!');

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.