https://github.com/netgusto/htmlparser-jresig
Javascript HTML Parser By John Resig (ejohn.org), wrapped as a Node.js module
https://github.com/netgusto/htmlparser-jresig
Last synced: 10 months ago
JSON representation
Javascript HTML Parser By John Resig (ejohn.org), wrapped as a Node.js module
- Host: GitHub
- URL: https://github.com/netgusto/htmlparser-jresig
- Owner: netgusto
- Created: 2014-03-27T16:49:47.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-08-05T09:24:21.000Z (over 11 years ago)
- Last Synced: 2025-03-19T16:19:23.215Z (10 months ago)
- Language: JavaScript
- Size: 234 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HTML Parser By John Resig (ejohn.org)
HTML Parser By John Resig (ejohn.org) wrapped as a Node.js module.
Original code by Erik Arvidsson, Mozilla Public License
// Use like so:
HTMLParser(htmlString, {
start: function(tag, attrs, unary) {},
end: function(tag) {},
chars: function(text) {},
comment: function(text) {}
});
// or to get an XML string:
HTMLtoXML(htmlString);
// or to get an XML DOM Document
HTMLtoDOM(htmlString);
// or to inject into an existing document/DOM node
HTMLtoDOM(htmlString, document);
HTMLtoDOM(htmlString, document.body);