---
title: nextSibling
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/xmlnode/nextsibling
---

# nextSibling

Returns the next NSXMLNode object that is a sibling node to the receiver.

## Declaration

```swift
@NSCopying var nextSibling: XMLNode? { get }
```

## Discussion

Discussion This object will have an index value that is one more than the receiver’s. If there are no more subsequent siblings (that is, other child nodes of the receiver’s parent) the method returns nil.

## See Also

### Navigating the Tree of Nodes

- [rootDocument](foundation/xmlnode/rootdocument.md)
- [parent](foundation/xmlnode/parent.md)
- [child(at:)](foundation/xmlnode/child(at:).md)
- [childCount](foundation/xmlnode/childcount.md)
- [children](foundation/xmlnode/children.md)
- [next](foundation/xmlnode/next.md)
- [previous](foundation/xmlnode/previous.md)
- [previousSibling](foundation/xmlnode/previoussibling.md)
- [detach()](foundation/xmlnode/detach().md)
