TRXMLParserDelegate documentation

Authors

Generated by root

Software documentation for the TRXMLParserDelegate protocol

TRXMLParserDelegate

Declared in:
TRXMLParserDelegate.h
The TRXMLParserDelegate protocol is a formal protocol that must be implemented by classes used as delegates for XML parsing.
Method summary

characters: 

- (void) characters: (NSString*)_chars;
Called by the parser whenever character data is parsed. The parser will attempt to compromise between getting the data to the handler as soon as possible, and avoiding calling this too frequently. Typically, this will either be passed a complete CDATA run in one go, or it will be passed the longest available CDATA section in the current parse buffer.

endElement: 

- (void) endElement: (NSString*)_Name;
Called whenever an XML element is terminated. Short form XML elements (e.g.
) will cause immediate calls to the start and end element methods in the delegate.

setParent: 

- (void) setParent: (id)newParent;
Sets the parent. When the delegate has finished parsing it should return control to the parent by setting the delegate in the associated parser.

setParser: 

- (void) setParser: (id)XMLParser;
Used to set the associated parser. Note: It might be better to parse the parser in to the other methods as an argument (e.g. characters:fromParser:). Anyone wishing to make this change should be aware that it will require a significant amount of refactoring in the XMPP code.

startElement: attributes: 

- (void) startElement: (NSString*)_Name attributes: (NSDictionary*)_attributes;
Called whenever a new XML element is started. Attributes are passed in a dictionary in the same key-value pairs in the XML source.