JSPM

  • Created
  • Published
  • Downloads 34246507
  • Score
    100M100P100Q222325F

Forgiving HTML/XML/RSS Parser for Node. This version is optimised and cleaned and provides a SAX interface (EventedHandler).

Package Exports

  • htmlparser2
  • htmlparser2/lib/EventedHandler.js
  • htmlparser2/lib/Parser
  • htmlparser2/lib/Parser.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (htmlparser2) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

#NodeHtmlParser A forgiving HTML/XML/RSS parser written in JS for both the browser and NodeJS (yes, despite the name it works just fine in any modern browser). The parser can handle streams (chunked data) and supports custom handlers for writing custom DOMs/output.

##Installing

npm install htmlparser

##Running Tests

###Run tests under node: node runtests.js

###Run tests in browser: View runtests.html in any browser

##Usage In Node var htmlparser = require("htmlparser"); var rawHtml = "Xyz