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