TRXMLParser class documentation

Authors

Generated by root

Software documentation for the TRXMLParser class

TRXMLParser : NSObject

Declared in:
TRXMLParser.h
An XML stream parse class. This parser is statefull, and will cache any unparsed data. Messages are fired off to the delegate for start and end tags as well as character data. This class might more accurately be called TRXMLScanner or TRXMLTokeniser since the actual parsing is handled by the delegate.

Instance Variables

Method summary

parserWithContentHandler: 

+ (id) parserWithContentHandler: (idTRXMLParserDelegate>)_contentHandler;
Create a new parser with the specified delegate.

initWithContentHandler: 

- (id) initWithContentHandler: (idTRXMLParserDelegate>)_contentHandler;
Initialise a new parser with the specified delegate.

parseFromSource: 

- (BOOL) parseFromSource: (NSString*)data;
Parse the given input string. This, appended to any data previously supplied using this method, must form a (partial) XML document. This function returns NO if an error occurs while parsing.

setContentHandler: 

- (id) setContentHandler: (idTRXMLParserDelegate>)_contentHandler;
Set the class to receive messages from input data. Commonly used to delegate handling child elements to other classes, or to pass control back to the parent afterwards.



Instance Variables for TRXMLParser Class

buffer

@protected NSMutableString* buffer;
Description forthcoming.

delegate

@protected id delegate;
Description forthcoming.

depth

@protected int depth;
Description forthcoming.

openTags

@protected NSMutableArray* openTags;
Description forthcoming.

state

@protected enum ... state;
Description forthcoming.