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

# CFXMLParserAbort

Causes a parser to abort with the given error code and description.

## Declaration

```occ
extern void CFXMLParserAbort(CFXMLParserRef parser, CFXMLParserStatusCode errorCode, CFStringRef errorDescription);
```

## Parameters

- `parser`: The parser to abort.
- `errorCode`: The error code to return to the parser.
- `errorDescription`: The error description string to return to the parser. This value may not be NULL.

## Discussion

Discussion This function cannot be called asynchronously. In other words, it must be called from within a parser callback function.

## See Also

### CFXMLParser Miscellaneous Functions

- [CFXMLParserCopyErrorDescription](corefoundation/cfxmlparsercopyerrordescription.md)
- [CFXMLParserCreate](corefoundation/cfxmlparsercreate.md)
- [CFXMLParserCreateWithDataFromURL](corefoundation/cfxmlparsercreatewithdatafromurl.md)
- [CFXMLParserGetCallBacks](corefoundation/cfxmlparsergetcallbacks.md)
- [CFXMLParserGetContext](corefoundation/cfxmlparsergetcontext.md)
- [CFXMLParserGetDocument](corefoundation/cfxmlparsergetdocument.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)
