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

# uri

Returns the URI associated with the receiver.

## Declaration

```swift
var uri: String? { get set }
```

## Discussion

Discussion A node’s URI is derived from its namespace or a document’s URI; for documents, the URI comes either from the parsed XML or is explicitly set. You cannot change the URI for a particular node other for than a namespace or document node.

## See Also

### Managing XML Node Objects

- [index](foundation/xmlnode/index.md)
- [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)
