htmldom2

0.0.8 • Public • Published

htmldom2

Parsing html on top of xmldom and htmlparser2

Usage

Parse html from a string

const source = `
<html>
  <head>
    <title>Hello World</title>
  <body>
    <h1>Hello World</h1>
  </body>
</html>
`;
const { DOMParser } = require('htmldom2');
const document = new DOMParser().parseFromString(source, 'text/html');

Readme

Keywords

none

Package Sidebar

Install

npm i htmldom2

Weekly Downloads

198

Version

0.0.8

License

ISC

Unpacked Size

13.9 kB

Total Files

15

Last publish

Collaborators

  • rexblack