Clone this repo:
  1. 1905ad2 Bump version in pubspec in preparation to publish (#110) by Nicholas Shahan · 14 days ago master 0.14.0+3
  2. 2b392a4 Fix spans generated for HTML with higher-plane unicode characters (#109) by cvolzke4 · 4 weeks ago
  3. d37f588 fix lint (#108) by Kevin Moore · 3 months ago
  4. 7dad64b fix latest pedantic lints (#107) by Kevin Moore · 3 months ago
  5. 478bdfa fix latest pedantic lints (#106) by Kevin Moore · 5 months ago

This is a pure Dart HTML5 parser. It's a port of html5lib from Python.

Usage

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.