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

Function findRoot

node_test.go:11–18  ·  view source on GitHub ↗
(n *Node)

Source from the content-addressed store, hash-verified

9)
10
11func findRoot(n *Node) *Node {
12 if n == nil {
13 return nil
14 }
15 for ; n.Parent != nil; n = n.Parent {
16 }
17 return n
18}
19
20func findNode(root *Node, name string) *Node {
21 node := root.FirstChild

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…