📚 htree - Awesome Go Library for Text Processing

Traverse, navigate, filter, and otherwise process trees of [html.Node](https://pkg.go.dev/golang.org/x/net/html#Node) objects
🏷️ Text Processing
📂 Markup Languages
⭐ 0 stars
Detailed Description of htree
Htree - Go package for working with html.Node trees
This is htree, a Go package that helps traverse, navigate, filter, and otherwise process trees of html.Node objects.
Usage
root, err := html.Parse(input)
if err != nil { ... }
body := htree.FindEl(root, func(n *html.Node) bool {
return n.DataAtom == atom.Body
})
content := htree.FindEl(body, func(n *html.Node) bool {
return n.DataAtom == atom.Div && htree.ElClassContains(n, "content")
})
...etc...