fb55/htmlparser2

Lacking documentation

eldoy opened this issue · 0 comments

The documentation for this library in the README is lacking. I had to read the source code to actually use it. How about adding a few practical examples of use? Like how to parse, then modify and dump the HTML?

This is apparently how you get the HTML from the dom? Found it by trial and error.

var dom = htmlparser2.parseDocument(html)
// How to modify here before dump?
var html = htmlparser2.DomUtils.getOuterHTML(dom)

How do you actually modify the HTML before you dump it?