MCPcopy Create free account
hub / github.com/antchfx/xmlquery / ChildNodes

Method ChildNodes

node.go:162–168  ·  view source on GitHub ↗

ChildNodes returns all the child nodes of the current node, including text, comments, and char data.

()

Source from the content-addressed store, hash-verified

160// ChildNodes returns all the child nodes of the current node,
161// including text, comments, and char data.
162func (n *Node) ChildNodes() []*Node {
163 var list []*Node
164 for child := n.FirstChild; child != nil; child = child.NextSibling {
165 list = append(list, child)
166 }
167 return list
168}
169
170func (n *Node) sanitizedData(preserveSpaces bool) string {
171 if preserveSpaces {

Callers 1

TestChildNodesFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestChildNodesFunction · 0.76