<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/XMLDocument/ContentKind",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@E@NSXMLDocumentContentKind"
  },
  "title" : "XMLDocument.ContentKind"
}
-->

# XMLDocument.ContentKind

Type used to define the kind of document content.

```
enum ContentKind
```

## Overview

For possible values, see <doc:xmldocument/document_content_types>.

## Topics

### Enumeration Cases

[`XMLDocument.ContentKind.html`](/documentation/Foundation/XMLDocument/ContentKind/html)

Outputs empty tags in HTML without a close tag, such as `<br>`.

[`XMLDocument.ContentKind.text`](/documentation/Foundation/XMLDocument/ContentKind/text)

Outputs the string value of the document by extracting the string values from all text nodes.

[`XMLDocument.ContentKind.xhtml`](/documentation/Foundation/XMLDocument/ContentKind/xhtml)

The document output is XHTML.

[`XMLDocument.ContentKind.xml`](/documentation/Foundation/XMLDocument/ContentKind/xml)

The default type of document content type, which is XML.



---

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)