---
title: CFXMLParserGetDocument
framework: Core Foundation
role: symbol
role_heading: Function
platforms: [macOS 10.0+]
path: corefoundation/cfxmlparsergetdocument
---

# CFXMLParserGetDocument

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

## Declaration

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

## Parameters

- `parser`: The XML parser to examine.

## Return Value

Return Value The top-most object returned by the createXMLStructure field in the CFXMLParserCallBacks structure. If the returned value is a Core Foundation object, ownership follows the The Get Rule.

## See Also

### CFXMLParser Miscellaneous Functions

- [CFXMLParserAbort](corefoundation/cfxmlparserabort.md)
- [CFXMLParserCopyErrorDescription](corefoundation/cfxmlparsercopyerrordescription.md)
- [CFXMLParserCreate](corefoundation/cfxmlparsercreate.md)
- [CFXMLParserCreateWithDataFromURL](corefoundation/cfxmlparsercreatewithdatafromurl.md)
- [CFXMLParserGetCallBacks](corefoundation/cfxmlparsergetcallbacks.md)
- [CFXMLParserGetContext](corefoundation/cfxmlparsergetcontext.md)
- [CFXMLParserGetLineNumber](corefoundation/cfxmlparsergetlinenumber.md)
- [CFXMLParserGetLocation](corefoundation/cfxmlparsergetlocation.md)
- [CFXMLParserGetSourceURL](corefoundation/cfxmlparsergetsourceurl.md)
- [CFXMLParserGetStatusCode](corefoundation/cfxmlparsergetstatuscode.md)
- [CFXMLParserGetTypeID](corefoundation/cfxmlparsergettypeid.md)
- [CFXMLParserParse](corefoundation/cfxmlparserparse.md)
