Deprecated CFXMLParser Functions
A function identified as deprecated has been superseded and may become unsupported in the future.
Deprecated in OS X v10.8
CFXMLParserAbort
Causes a parser to abort with the given error code and description. (Deprecated in OS X v10.8.)
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
This function cannot be called asynchronously. In other words, it must be called from within a parser callback function.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.8.
Declared In
CFXMLParser.hCFXMLParserCopyErrorDescription
Returns the user-readable description of the current error condition. (Deprecated in OS X v10.8.)
CFStringRef CFXMLParserCopyErrorDescription ( CFXMLParserRef parser );
Parameters
- parser
The XML parser to examine.
Return Value
A user-readable description of the current error condition, or NULL if no error occurred. Ownership follows the Create Rule.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.8.
Declared In
CFXMLParser.hCFXMLParserCreate
Creates a new XML parser for the specified XML data. (Deprecated in OS X v10.8.)
CFXMLParserRef CFXMLParserCreate ( CFAllocatorRef allocator, CFDataRef xmlData, CFURLRef dataSource, CFOptionFlags parseOptions, CFIndex versionOfNodes, CFXMLParserCallBacks *callBacks, CFXMLParserContext *context );
Parameters
- allocator
The allocator to use to allocate memory for the new object. Pass
NULLorkCFAllocatorDefaultto use the current default allocator.- xmlData
The XML data to parse. Do not pass
NULL.- dataSource
The URL from which the XML data was obtained. The URL is used to resolve any relative references found in XML Data. Pass
NULLif a valid URL is unavailable.- parseOptions
Flags which control how the XML data will be parsed. See Parsing Options for the list of available options.
- versionOfNodes
Determines which version of CFXMLNode objects are produced by the parser.
- callBacks
Callbacks called by the parser as the XML is processed. The callbacks are called as each XML tag is encountered, when an external entity needs to be resolved, and when an error occurs. See
CFXMLParserCallBacksand the individual callbacks for more details. Do not passNULL.- context
Determines what, if any, information pointer is passed to the callbacks as the parse progresses; context may be
NULL.
Return Value
The newly created parser. Ownership follows the Create Rule.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.8.
Declared In
CFXMLParser.hCFXMLParserCreateWithDataFromURL
Creates a new XML parser for the specified XML data at the specified URL. (Deprecated in OS X v10.8.)
CFXMLParserRef CFXMLParserCreateWithDataFromURL ( CFAllocatorRef allocator, CFURLRef dataSource, CFOptionFlags parseOptions, CFIndex versionOfNodes, CFXMLParserCallBacks *callBacks, CFXMLParserContext *context );
Parameters
- allocator
The allocator to use to allocate memory for the new object. Pass
NULLorkCFAllocatorDefaultto use the current default allocator.- dataSource
The URL from which to load the XML data. The URL is used to resolve any relative references found in XML Data. It must be a valid CFURL object;
NULLis an unacceptable value.- parseOptions
Flags which control how the XML data will be parsed. See Parsing Options for the list of available options.
- versionOfNodes
Determines which version of CFXMLNode objects are produced by the parser.
- callBacks
Callbacks called by the parser as the XML is processed. The callbacks are called as each XML tag is encountered, when an external entity needs to be resolved, and when an error occurs. See
CFXMLParserCallBacksand the individual callbacks for more details. Do not passNULL.- context
Determines what, if any, information pointer is passed to the callbacks as the parse progresses; may be
NULL.
Return Value
The newly created parser. Ownership follows the Create Rule.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.8.
Declared In
CFXMLParser.hCFXMLParserGetCallBacks
Returns the callbacks associated with an XML parser when it was created. (Deprecated in OS X v10.8.)
void CFXMLParserGetCallBacks ( CFXMLParserRef parser, CFXMLParserCallBacks *callBacks );
Parameters
- parser
The XML parser to examine.
- callBacks
On return, contains the callbacks for parser.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.8.
Declared In
CFXMLParser.hCFXMLParserGetContext
Returns the context for an XML parser. (Deprecated in OS X v10.8.)
void CFXMLParserGetContext ( CFXMLParserRef parser, CFXMLParserContext *context );
Parameters
- parser
The XML parser to examine.
- context
On return, a pointer to the context structure for parser.
Discussion
If you set a context for the parser, it will be passed to you as a parameter in each of the parser callback functions. The context data structure is application defined and associated with a parser using one of the CFXMLParserCreate... functions.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.8.
Declared In
CFXMLParser.hCFXMLParserGetDocument
Returns the top-most object returned by the create XML structure callback. (Deprecated in OS X v10.8.)
void *CFXMLParserGetDocument ( CFXMLParserRef parser );
Parameters
- parser
The XML parser to examine.
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 Get Rule.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.8.
Declared In
CFXMLParser.hCFXMLParserGetLineNumber
Returns the line number of the current parse location. (Deprecated in OS X v10.8.)
CFIndex CFXMLParserGetLineNumber ( CFXMLParserRef parser );
Parameters
- parser
The XML parser to examine.
Return Value
The line number of the current location.
Discussion
This function is typically used in conjunction with the CFXMLParserHandleErrorCallBack function so that error location information can be reported.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.8.
Declared In
CFXMLParser.hCFXMLParserGetLocation
Returns the character index of the current parse location. (Deprecated in OS X v10.8.)
CFIndex CFXMLParserGetLocation ( CFXMLParserRef parser );
Parameters
- parser
The XML parser to examine.
Return Value
The character index of the current parse location.
Discussion
This function is typically used in conjunction with the CFXMLParserHandleErrorCallBack function so that error location information can be reported.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.8.
Declared In
CFXMLParser.hCFXMLParserGetSourceURL
Returns the URL for the XML data being parsed. (Deprecated in OS X v10.8.)
CFURLRef CFXMLParserGetSourceURL ( CFXMLParserRef parser );
Parameters
- parser
The XML parser to examine.
Return Value
The URL for the XML document being parsed. Ownership follows the Get Rule.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.8.
Declared In
CFXMLParser.hCFXMLParserGetStatusCode
Returns a numeric code indicating the current status of the parser. (Deprecated in OS X v10.8.)
CFXMLParserStatusCode CFXMLParserGetStatusCode ( CFXMLParserRef parser );
Parameters
- parser
The XML parser to examine.
Return Value
A status code indicating the current parser. See Parser Status Codes for a list of possible status codes.
Discussion
If an error has occurred, the code for the last error is returned. If no error has occurred, a status code is returned.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.8.
Declared In
CFXMLParser.hCFXMLParserGetTypeID
Returns the type identifier for the CFXMLParser opaque type. (Deprecated in OS X v10.8.)
CFTypeID CFXMLParserGetTypeID ();
Return Value
The type identifier for the CFXMLParser opaque type.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.8.
Declared In
CFXMLParser.hCFXMLParserParse
Begins a parse of the XML data that was associated with the parser when it was created. (Deprecated in OS X v10.8.)
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 function to get the product of the parse. Upon failure, use the CFXMLParserGetContext or CFXMLParserCopyErrorDescription functions to get information about the error. It is an error to call the CFXMLParserParse function while a parse is already underway.
Availability
- Available in OS X v10.0 and later.
- Deprecated in OS X v10.8.
Declared In
CFXMLParser.h© 2003, 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-10-15)