An open API service indexing awesome lists of open source software.

https://github.com/benignware/htmldom2

Parse html on top of xmldom and htmlparser2
https://github.com/benignware/htmldom2

Last synced: 11 months ago
JSON representation

Parse html on top of xmldom and htmlparser2

Awesome Lists containing this project

README

          

# htmldom2

Parsing html on top of [xmldom](https://www.npmjs.com/package/xmldom) and [htmlparser2](https://www.npmjs.com/package/htmlparser2)

## Usage

### Parse html from a string

```js
const source = `


Hello World

Hello World


`;
const { DOMParser } = require('htmldom2');
const document = new DOMParser().parseFromString(source, 'text/html');
```