<!--
{
  "documentType" : "article",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/error-dictionary-keys",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Error Dictionary Keys"
}
-->

# Error Dictionary Keys

The keys used in an error dictionary returned by some functions to provide more information about XML parse errors.

## Discussion

These keys are used in the error dictionary returned by the [`CFXMLTreeCreateFromDataWithError`](/documentation/CoreFoundation/CFXMLTreeCreateFromDataWithError) function.

## Topics

### Constants

[`let kCFXMLTreeErrorDescription: CFString!`](/documentation/CoreFoundation/kCFXMLTreeErrorDescription)

Dictionary key whose value is a CFString containing a readable description of the error.

[`let kCFXMLTreeErrorLineNumber: CFString!`](/documentation/CoreFoundation/kCFXMLTreeErrorLineNumber)

Dictionary key whose value is a CFNumber containing the line number where the error was detected. This may not be the line number where the actual XML error is located.

[`let kCFXMLTreeErrorLocation: CFString!`](/documentation/CoreFoundation/kCFXMLTreeErrorLocation)

Dictionary key whose value is a CFNumber containing the byte location where the error was detected.

[`let kCFXMLTreeErrorStatusCode: CFString!`](/documentation/CoreFoundation/kCFXMLTreeErrorStatusCode)

Dictionary key whose value is a CFNumber containing the error status code. See [`CFXMLParser`](/documentation/CoreFoundation/CFXMLParser) for possible status code values.



---

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)