MCPcopy Create free account
hub / github.com/antchfx/htmlquery / OutputHTML

Function OutputHTML

query.go:224–234  ·  view source on GitHub ↗

OutputHTML returns the text including tags name.

(n *html.Node, self bool)

Source from the content-addressed store, hash-verified

222
223// OutputHTML returns the text including tags name.
224func OutputHTML(n *html.Node, self bool) string {
225 var b strings.Builder
226 if self {
227 html.Render(&b, n)
228 } else {
229 for n := n.FirstChild; n != nil; n = n.NextSibling {
230 html.Render(&b, n)
231 }
232 }
233 return b.String()
234}
235
236type NodeNavigator struct {
237 root, curr *html.Node

Callers 1

TestXPathFunction · 0.85

Calls 1

StringMethod · 0.80

Tested by 1

TestXPathFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…