<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFXMLNodeTypeCode",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@E@CFXMLNodeTypeCode"
  },
  "title" : "CFXMLNodeTypeCode"
}
-->

# CFXMLNodeTypeCode

The various XML data type identification codes that the parser uses to describe XML structures.

```
enum CFXMLNodeTypeCode
```

## Overview

When the parser encounters a new XML structure, its data type and contents are placed in a CFXMLNode object.

## Topics

### Constants

[`kCFXMLNodeTypeDocument`](/documentation/CoreFoundation/CFXMLNodeTypeCode/document)

Indicates a document where the data string is `NULL` and the additional information is a pointer to a [`CFXMLDocumentInfo`](/documentation/CoreFoundation/CFXMLDocumentInfo) structure.

[`kCFXMLNodeTypeElement`](/documentation/CoreFoundation/CFXMLNodeTypeCode/element)

Indicates an element where the data string is the name of the tag and the additional information is a pointer to a [`CFXMLElementInfo`](/documentation/CoreFoundation/CFXMLElementInfo) structure.

[`kCFXMLNodeTypeAttribute`](/documentation/CoreFoundation/CFXMLNodeTypeCode/attribute)

Currently not used.

[`kCFXMLNodeTypeProcessingInstruction`](/documentation/CoreFoundation/CFXMLNodeTypeCode/processingInstruction)

Indicates a processing instruction where the data string is the name of the target and the additional information is a pointer to a [`CFXMLProcessingInstructionInfo`](/documentation/CoreFoundation/CFXMLProcessingInstructionInfo) structure.

[`kCFXMLNodeTypeComment`](/documentation/CoreFoundation/CFXMLNodeTypeCode/comment)

Indicates a comment section where the data string is the text of the comment and the additional information is `NULL`.

[`kCFXMLNodeTypeText`](/documentation/CoreFoundation/CFXMLNodeTypeCode/text)

Indicates a text section where the data string is the text’s contents and the additional information is `NULL`.

[`kCFXMLNodeTypeCDATASection`](/documentation/CoreFoundation/CFXMLNodeTypeCode/cdataSection)

Indicates a CDATA section where the data string is the text of the CDATA and the additional information is `NULL`.

[`kCFXMLNodeTypeDocumentFragment`](/documentation/CoreFoundation/CFXMLNodeTypeCode/documentFragment)

Currently not used.

[`kCFXMLNodeTypeEntity`](/documentation/CoreFoundation/CFXMLNodeTypeCode/entity)

Indicates an entity where the data string is the name of the entity and the additional information is a pointer to a [`CFXMLEntityInfo`](/documentation/CoreFoundation/CFXMLEntityInfo) structure.

[`kCFXMLNodeTypeEntityReference`](/documentation/CoreFoundation/CFXMLNodeTypeCode/entityReference)

Indicates an entity reference where the data string is the name of the referenced entity and the additional information is a pointer to a [`CFXMLEntityReferenceInfo`](/documentation/CoreFoundation/CFXMLEntityReferenceInfo) structure.

[`kCFXMLNodeTypeDocumentType`](/documentation/CoreFoundation/CFXMLNodeTypeCode/documentType)

Indicates a document type where the data string is the name given to the top-level element and the additional information is a pointer to a [`CFXMLDocumentTypeInfo`](/documentation/CoreFoundation/CFXMLDocumentTypeInfo) structure.

[`kCFXMLNodeTypeWhitespace`](/documentation/CoreFoundation/CFXMLNodeTypeCode/whitespace)

Indicates white space where the data string is the text of the white space and the additional information is `NULL`.

[`kCFXMLNodeTypeNotation`](/documentation/CoreFoundation/CFXMLNodeTypeCode/notation)

Indicates a notation where the data string is the notation name and the additional information is a pointer to a [`CFXMLNotationInfo`](/documentation/CoreFoundation/CFXMLNotationInfo) structure.

[`kCFXMLNodeTypeElementTypeDeclaration`](/documentation/CoreFoundation/CFXMLNodeTypeCode/elementTypeDeclaration)

Indicates an element type declaration where the data string is the tag name and the additional information is a pointer to a [`CFXMLElementTypeDeclarationInfo`](/documentation/CoreFoundation/CFXMLElementTypeDeclarationInfo) structure.

[`kCFXMLNodeTypeAttributeListDeclaration`](/documentation/CoreFoundation/CFXMLNodeTypeCode/attributeListDeclaration)

Indicates an attribute list declaration where the data string is the tag name and the additional information is a pointer to a [`CFXMLAttributeListDeclarationInfo`](/documentation/CoreFoundation/CFXMLAttributeListDeclarationInfo) structure.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

---

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)