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

# CFXMLParserParse

Begins a parse of the XML data that was associated with the parser when it was created.

```
extern Boolean CFXMLParserParse(CFXMLParserRef parser);
```

## Parameters

`parser`

The XML parser to start.

## Return Value

`true` if the parse was successful, `false` otherwise.

## Discussion

Upon success, use the [`CFXMLParserGetDocument`](/documentation/CoreFoundation/CFXMLParserGetDocument) function to get the product of the parse. Upon failure, use the [`CFXMLParserGetContext`](/documentation/CoreFoundation/CFXMLParserGetContext) or [`CFXMLParserCopyErrorDescription`](/documentation/CoreFoundation/CFXMLParserCopyErrorDescription) functions to get information about the error. It is an error to call the [`CFXMLParserParse`](/documentation/CoreFoundation/CFXMLParserParse) function while a parse is already underway.

---

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)