<!--
{
  "availability" : [
    "macOS: 10.0.0 - 10.8.0"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFXMLParserGetDocument",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFXMLParserGetDocument"
  },
  "title" : "CFXMLParserGetDocument"
}
-->

# CFXMLParserGetDocument

Returns the top-most object returned by the create XML structure callback.

```
extern void *CFXMLParserGetDocument(CFXMLParserRef parser);
```

## Parameters

`parser`

The XML parser to examine.

## Return Value

The top-most object returned by the `createXMLStructure` field in the [`CFXMLParserCallBacks`](/documentation/CoreFoundation/CFXMLParserCallBacks) structure. If the returned value is a Core Foundation object, ownership follows the [The Get Rule](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-SW1).

## Discussion

---

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)