fast-html-dom-parser

1.0.5 • Public • Published

📖 Fast-html-dom-parser v1.0.5

Fast parser of a html string and lot of options.

Update

  • All bugs fixed
  • new declaration FastHTMLParser

🐱 Github and NPM


Imports


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');

📚 API


Construction

//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');

Usages

Implemented properties

  • nodeName
  • childNodes
  • firstChild
  • lastChild
  • parentNode
  • attributes
  • innerHTML
  • outerHTML
  • textContent

Implemented methods

  • getAttribute
  • setAttribute
  • getElementById
  • getElementsByClassName
  • getElementsByTagName
  • getElementsByName

Package Sidebar

Install

npm i fast-html-dom-parser

Weekly Downloads

155

Version

1.0.5

License

MIT

Unpacked Size

12.2 kB

Total Files

7

Last publish

Collaborators

  • yoannchb