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

Method MoveToParent

query.go:223–232  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

221}
222
223func (x *NodeNavigator) MoveToParent() bool {
224 if x.attr != -1 {
225 x.attr = -1
226 return true
227 } else if node := x.curr.Parent; node != nil {
228 x.curr = node
229 return true
230 }
231 return false
232}
233
234func (x *NodeNavigator) MoveToNextAttribute() bool {
235 if x.attr >= len(x.curr.Attr)-1 {

Callers 1

TestNavigatorFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestNavigatorFunction · 0.76