GSXMLParser 0.1 15 September, 2000 GSXMLParser GSXML.h

XML Parser.

parser: source

Creation of a new Parser.

Source must be NSString or NSData.

GSXMLParser *p = [GSXMLParser parser:@"macos.xml"]; if ([p parse]) { [[p doc] dump]; } else { printf("error parse file\n"); }
parserWithSAXHandler: handler source: source

Creation of a new Parser with SAX handler.

NSAutoreleasePool *arp = [[NSAutoreleasePool alloc] init]; GSSAXHandler *h = [GSDebugSAXHandler handler]; GSXMLParser *p = [GSXMLParser parserWithSAXHandler: h source: @"macos.xml"]; if ([p parse]) { printf("ok\n"); } [arp release];
initWithSAXHandler: handler source: source

Creation of a new Parser with SAX handler.

lib

Return pointer to xmlParserCtxt structure.

doc

Return GSXMLDocument object.

parse

Parse source. Return YES if parsed, otherwise NO.

GSXMLParser *p = [GSXMLParser parser:@"macos.xml"]; if ([p parse]) { [[p doc] dump]; } else { printf("error parse file\n"); }
substituteEntites: yesno

Set and return the previous value for default entity support. Initially the parser always keep entity references instead of substituting entity values in the output.

keepBlanks: yesno

Set and return the previous value for default blanks text nodes support. ignorableWhitespace() are only generated when running the parser in validating mode and when the current element doesn't allow CDATA or mixed content.

getWarnings: yesno doValidityChecking: yesno

Sets whether the document needs to be validated.

errNo

Return error code.

setExternalEntityLoader function

Set a external entity loader.