---
title: version
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/xmldocument/version
---

# version

Sets the version of the receiver’s XML.

## Declaration

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

## Parameters

- `version`: A string object identifying the version of the XML.

## Discussion

Discussion Currently, the version should be either “1.0 “or “1.1”.

## See Also

### Managing Document Attributes

- [characterEncoding](foundation/xmldocument/characterencoding.md)
- [documentContentKind](foundation/xmldocument/documentcontentkind.md)
- [dtd](foundation/xmldocument/dtd.md)
- [isStandalone](foundation/xmldocument/isstandalone.md)
- [mimeType](foundation/xmldocument/mimetype.md)
