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

Function QueryAll

query.go:88–94  ·  view source on GitHub ↗

QueryAll searches the XML Node that matches by the specified XPath expr. Returns an error if the expression `expr` cannot be parsed.

(top *Node, expr string)

Source from the content-addressed store, hash-verified

86// QueryAll searches the XML Node that matches by the specified XPath expr.
87// Returns an error if the expression `expr` cannot be parsed.
88func QueryAll(top *Node, expr string) ([]*Node, error) {
89 exp, err := getQuery(expr)
90 if err != nil {
91 return nil, err
92 }
93 return QuerySelectorAll(top, exp), nil
94}
95
96// Query searches the XML Node that matches by the specified XPath expr,
97// and returns first matched element.

Callers 2

FindFunction · 0.85

Calls 2

getQueryFunction · 0.85
QuerySelectorAllFunction · 0.85

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…