typedef enum { kCFXMLParserValidateDocument = (1 << 0), kCFXMLParserSkipMetaData = (1 << 1), kCFXMLParserReplacePhysicalEntities = (1 << 2), kCFXMLParserSkipWhitespace = (1 << 3), kCFXMLParserResolveExternalEntities = (1 << 4), kCFXMLParserAddImpliedAttributes = (1 << 5), kCFXMLParserAllOptions = 0x00FFFFFF, kCFXMLParserNoOptions = 0 } CFXMLParserOptions;
These are the various options you use to configure the parser. An option flag of 0 (kCFXMLParserNoOptions) leaves the XML as "intact" as possible (reports all structures; performs no replacements). Hence, to make the parser do the most work, returning only the pure element tree, set the option flag to kCFXMLParserAllOptions.
Name Description kCFXMLParserValidateDocument Validate the document against its grammar from the DTD, reporting any errors. Currently not supported. kCFXMLParserSkipMetaData Skip metadata constructs such as the DTD and comments. kCFXMLParserReplacePhysicalEntities Replace declared entities like <. Other than the 5 predefined entities (lt, gt, quot, amp, apos), these must be defined in the DTD. Currently not supported. kCFXMLParserSkipWhitespace Skip over all whitespace that does not abut non-whitespace character data. In other words, given , the whitespace between foo's open tag and bar's open tag would be suppressed, but the whitespace around blah would be preserved. blah kCFXMLParserAddImpliedAttributes Where the DTD specifies implied attribute-value pairs for a particular element, add those pairs to any oc of the element in the element tree. Currently not supported. kCFXMLParserAllOptions Return only the pure element tree. kCFXMLParserNoOptions Leave the XML as intact as possible. Report all structures and perform no replacements.
typedef enum { kCFXMLStatusParseNotBegun = -2, kCFXMLStatusParseInProgress = -1, kCFXMLStatusParseSuccessful = 0, kCFXMLErrorUnexpectedEOF = 1, kCFXMLErrorUnknownEncoding, kCFXMLErrorEncodingConversionFailure, kCFXMLErrorMalformedProcessingInstruction, kCFXMLErrorMalformedDTD, kCFXMLErrorMalformedName, kCFXMLErrorMalformedCDSect, kCFXMLErrorMalformedCloseTag, kCFXMLErrorMalformedStartTag, kCFXMLErrorMalformedDocument, kCFXMLErrorElementlessDocument, kCFXMLErrorMalformedComment, kCFXMLErrorMalformedCharacterReference, kCFXMLErrorMalformedParsedCharacterData, kCFXMLErrorNoData } CFXMLParserStatusCode;
Parser status is determined by calling the function CFXMLParserGetStatusCode. The parser reports errors to your application by invoking the CFXMLParserHandleErrorCallBack callback function.
© 2000 Apple Computer, Inc. (Last Updated 7/20/2000)