Clone this repo:
  1. 1e95e60 Bump dart-lang/setup-dart from 0.3 to 1 (#164) by dependabot[bot] · 3 weeks ago master
  2. 2500447 add dependabot by Kevin Moore · 3 weeks ago
  3. 271e2bb Fix newly enforced lint (#161) by Kevin Moore · 8 weeks ago
  4. c47ca9d Merge pull request #160 from dart-lang/franklinyow-patch-1 by Franklin Yow · 3 months ago
  5. e8af46a Update LICENSE by Franklin Yow · 3 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.