GSXMLParser 0.1 15 September, 2000 GSXMLParser GSXML.h

XML Parser.

parser: source

Creation of a new Parser by calling initWithSAXHandler:source:

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 by calling initWithSAXHandler:source:

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];
xmlEncodingStringForStringEncoding: encoding Return the name of the string encoding (for XML) to use for the specified OpenStep encoding. initWithSAXHandler: handler source: source

Initialisation of a new Parser with SAX handler (if not nil).

The source object is intended to be any reasonable value, but for initial implementation may be an NSData object containing raw XML text, or the name of a file to parse.

Future options are intended to include NSURL objects, and nil objects (for incremental (data push) operation.

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.