XML:goNext([name])

Move to the next sibling element. Returns true on success or false otherwise. Does not move if there is no element after the current position. If the optional name is specified, move to the next sibling element that has the given name, skipping over any elements that do not match the given name.

Example

doc = XML.parse(str)
doc:goPath('/foo/bar')
if not doc:goNext() then
    return null
end