Fast parser of a html string and lot of options.
- All bugs fixed
- new declaration FastHTMLParser
Browser
<script src="./fast-html-dom-parser.js" type="text/javascript"></script>
Node
const { FastHTMLParser } = require('./fast-html-dom-parser.js');
const { FastHTMLParser } = require('fast-html-dom-parser');
//here html is a string of you html code
//Browser
const document = new FastHTMLParser(html);
//Node
const document = new FastHTMLParser(html);
//example
document.getElementById('test').getElementsByTagName('div')[0].getAttribute('class');
- nodeName
- childNodes
- firstChild
- lastChild
- parentNode
- attributes
- innerHTML
- outerHTML
- textContent
- getAttribute
- setAttribute
- getElementById
- getElementsByClassName
- getElementsByTagName
- getElementsByName