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

# index

Returns the index of the receiver identifying its position relative to its sibling nodes.

## Declaration

```swift
var index: Int { get }
```

## Return Value

Return Value An integer that is the index of the receiver relative to its sibling nodes.

## Discussion

Discussion The first child node of a parent has an index of zero.

## See Also

### Related Documentation

- [child(at:)](foundation/xmlnode/child(at:).md)

### Managing XML Node Objects

- [kind](foundation/xmlnode/kind-swift.property.md)
- [level](foundation/xmlnode/level.md)
- [name](foundation/xmlnode/name.md)
- [objectValue](foundation/xmlnode/objectvalue.md)
- [stringValue](foundation/xmlnode/stringvalue.md)
- [setStringValue(_:resolvingEntities:)](foundation/xmlnode/setstringvalue(_:resolvingentities:).md)
- [setURI:](foundation/nsxmlnode-seturi.md)
- [uri](foundation/xmlnode/uri.md)
