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
- Host: GitHub
- URL: https://github.com/benignware/htmldom2
- Owner: benignware
- Created: 2018-12-09T03:12:53.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-08-31T12:26:59.000Z (almost 4 years ago)
- Last Synced: 2025-07-25T00:30:57.878Z (11 months ago)
- Language: JavaScript
- Size: 76.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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');
```