MCPcopy Create free account
hub / github.com/antchfx/xpath / selectNode

Function selectNode

xpath_test.go:322–328  ·  view source on GitHub ↗
(root *TNode, expr string)

Source from the content-addressed store, hash-verified

320}
321
322func selectNode(root *TNode, expr string) *TNode {
323 list := selectNodes(root, expr)
324 if len(list) == 0 {
325 return nil
326 }
327 return list[0]
328}
329
330func selectNodes(root *TNode, expr string) []*TNode {
331 t := Select(createNavigator(root), expr)

Callers 8

TestNodeTypeFunction · 0.85
Test_func_containsFunction · 0.85
Test_func_ends_withFunction · 0.85
Test_func_starts_withFunction · 0.85
Test_func_sumFunction · 0.85
Test_func_matchesFunction · 0.85
Test_func_reverseFunction · 0.85

Calls 1

selectNodesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…