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

# CFXMLParserGetLineNumber

Returns the line number of the current parse location.

## Declaration

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

## Parameters

- `parser`: The XML parser to examine.

## Return Value

Return Value The line number of the current 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)
- [CFXMLParserGetLocation](corefoundation/cfxmlparsergetlocation.md)
- [CFXMLParserGetSourceURL](corefoundation/cfxmlparsergetsourceurl.md)
- [CFXMLParserGetStatusCode](corefoundation/cfxmlparsergetstatuscode.md)
- [CFXMLParserGetTypeID](corefoundation/cfxmlparsergettypeid.md)
- [CFXMLParserParse](corefoundation/cfxmlparserparse.md)
