NextSibling returns the next sibling in the tree
()
| 135 | |
| 136 | // NextSibling returns the next sibling in the tree |
| 137 | func (n *Node) NextSibling() *Node { |
| 138 | if !n.IsValid() { |
| 139 | return nil |
| 140 | } |
| 141 | return NewNode(n.node.NextSibling(), n.source) |
| 142 | } |
| 143 | |
| 144 | // NextNamedSibling returns the next named sibling in the tree |
| 145 | func (n *Node) NextNamedSibling() *Node { |