CFXMLParserCreate
Creates a new XML parser for the specified XML data.
Declaration
extern 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
NULLor kCFAllocatorDefault to 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 Cfxmlparseroptions 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 Cfxmlparsercallbacks and the individual callbacks for more details. Do not pass
NULL. - context:
Determines what, if any, information pointer is passed to the callbacks as the parse progresses;
contextmay beNULL.
Return Value
The newly created parser. Ownership follows the The Create Rule.