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

# mimeType

Returns the MIME type for the receiver.

## Declaration

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

## Return Value

Return Value The MIME type for the receiver (for example, “text/xml”).

## Discussion

Discussion MIME types are assigned by IANA (see http://www.iana.org/assignments/media-types/index.html).

## 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)
- [version](foundation/xmldocument/version.md)
