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

# CFXMLParserGetLocation

Returns the character index of the current parse location.

## Declaration

```occ
extern CFIndex CFXMLParserGetLocation(CFXMLParserRef parser);
```

## Parameters

- `parser`: The XML parser to examine.

## Return Value

Return Value The character index of the current parse location.

## Discussion

Discussion This function is typically used in conjunction with the CFXMLParserHandleErrorCallBack function so that error location information can be reported.

## 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)
- [CFXMLParserGetDocument](corefoundation/cfxmlparsergetdocument.md)
- [CFXMLParserGetLineNumber](corefoundation/cfxmlparsergetlinenumber.md)
- [CFXMLParserGetSourceURL](corefoundation/cfxmlparsergetsourceurl.md)
- [CFXMLParserGetStatusCode](corefoundation/cfxmlparsergetstatuscode.md)
- [CFXMLParserGetTypeID](corefoundation/cfxmlparsergettypeid.md)
- [CFXMLParserParse](corefoundation/cfxmlparserparse.md)
