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

Function QuerySelectorAll

query.go:108–115  ·  view source on GitHub ↗

QuerySelectorAll searches all of the XML Node that matches the specified XPath selectors.

(top *Node, selector *xpath.Expr)

Source from the content-addressed store, hash-verified

106// QuerySelectorAll searches all of the XML Node that matches the specified
107// XPath selectors.
108func QuerySelectorAll(top *Node, selector *xpath.Expr) []*Node {
109 t := selector.Select(CreateXPathNavigator(top))
110 var elems []*Node
111 for t.MoveNext() {
112 elems = append(elems, getCurrentNode(t))
113 }
114 return elems
115}
116
117// QuerySelector returns the first matched XML Node by the specified XPath
118// selector.

Callers 1

QueryAllFunction · 0.85

Calls 2

CreateXPathNavigatorFunction · 0.85
getCurrentNodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…