QuerySelectorAll searches all of the XML Node that matches the specified XPath selectors.
(top *Node, selector *xpath.Expr)
| 106 | // QuerySelectorAll searches all of the XML Node that matches the specified |
| 107 | // XPath selectors. |
| 108 | func 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. |
no test coverage detected
searching dependent graphs…