<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/XMLDocument/mimeType",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSXMLDocument(py)MIMEType"
  },
  "title" : "mimeType"
}
-->

# mimeType

Returns the MIME type for the receiver.

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

## Return Value

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

## Discussion

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

## See Also

  <doc:nsxmldocument/1806541-setmimetype>



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)