html5
HTML5 HTML parser, including support for SVG and MathML foreign content
Last updated 12 years ago by aredridel .
MIT · Repository · Original npm · Tarball · package.json
$ npm install html5 
SYNC missed versions from official npm registry.

HTML5 Parser for node.js

Build Status

Examples

A simple example:

var HTML5 = require('html5');
var jsdom = require('jsdom');
var core = jsdom.browserAugmentation(jsdom.level(3));

var impl = new core.DOMImplementation();
var document = impl.createDocument();
var parser = new HTML5.JSDOMParser(document, core);

parser.parse('<p>I am a very small HTML document</p>');

console.log(document.getElementsByTagName("p")[0].innerHTML);

Interesting features

  • Streaming parser: You can pass parser.parse an EventEmitter and the parser will keep adding data as it's received.

  • HTML5 parsing algorithm. If you find something this can't parse, I'll want to know about it. It should make sense out of anything a browser can.

Installation

Use npm, or to use the git checkout, read on.

You'll need to fetch dependencies or initialize git submodules if you're pulling this from my git repository.

npm install

and give it a run:

npm test

Git repository at http://dinhe.net/~aredridel/projects/js/html5.git/

Current Tags

  • 1.0.5                                ...           latest (10 years ago)

37 Versions

  • 1.0.5                                ...           10 years ago
  • 1.0.4                                ...           10 years ago
  • 1.0.3                                ...           10 years ago
  • 1.0.2                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
  • 0.4.1                                ...           11 years ago
  • 0.4.0                                ...           11 years ago
  • 0.3.16                                ...           11 years ago
  • 0.3.15                                ...           11 years ago
  • 0.3.14                                ...           11 years ago
  • 0.3.13                                ...           12 years ago
  • 0.3.12                                ...           12 years ago
  • 0.3.11                                ...           12 years ago
  • 0.3.10                                ...           12 years ago
  • 0.3.9                                ...           12 years ago
  • 0.3.8                                ...           13 years ago
  • 0.3.7                                ...           13 years ago
  • 0.3.5                                ...           13 years ago
  • 0.3.4                                ...           13 years ago
  • 0.3.2                                ...           13 years ago
  • 0.3.1                                ...           13 years ago
  • 0.3.0                                ...           13 years ago
  • 0.2.16                                ...           13 years ago
  • 0.2.15                                ...           14 years ago
  • 0.2.14                                ...           14 years ago
  • 0.2.13                                ...           14 years ago
  • 0.2.12                                ...           14 years ago
  • 0.2.11                                ...           14 years ago
  • 0.2.10                                ...           14 years ago
  • 0.2.9                                ...           14 years ago
  • 0.2.7                                ...           14 years ago
  • 0.2.6                                ...           14 years ago
  • 0.2.5                                ...           14 years ago
  • 0.2.4                                ...           14 years ago
  • 0.2.3                                ...           14 years ago
  • 0.2.2                                ...           14 years ago
Maintainers (1)
Downloads
Total 1
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (3)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE