TRXMLNode class documentation

Authors

Generated by root

Software documentation for the TRXMLNode class

TRXMLNode : NSObject

Declared in:
TRXMLNode.h
Conforms to:
TRXMLParserDelegate
The TRXMLNode class represents a single XML element, which may contain character data or other nodes. It can be used with the parser directly to create an object structure representing the XML hierarchy. More commonly, it is used to generate the tree directly and then output XML. This class almost certainly uses some non-standard terminology relating to XML, which should probably be fixed at some point. Eventually, this class should probably be retired. Currently, most of the XMPP code only uses the +TRXMLNodeWithType , +TRXMLNodeWithType:attributes: , -addChild: , -addCData: and -stringValue: methods. All others should be considered deprecated. Note: TRXMLNode objects are always mutable, and should be treated as such.

Instance Variables

Method summary

TRXMLNodeWithType: 

+ (id) TRXMLNodeWithType: (NSString*)type;
Create a new instance of the class with the specified type. [TRXMLNode TRXMLNodeWithType:@"foo"] give an object representing the XML string "

TRXMLNodeWithType: attributes: 

+ (id) TRXMLNodeWithType: (NSString*)type attributes: (NSDictionary*)_attributes;
Create a new instance of the class with the specified type and attributes.

addCData: 

- (void) addCData: (id)newCData;
Description forthcoming.

addChild: 

- (void) addChild: (id)anElement;
Description forthcoming.

cdata 

- (NSString*) cdata;
Description forthcoming.

children 

- (unsigned int) children;
Description forthcoming.

elements 

- (NSArray*) elements;
Description forthcoming.

get: 

- (NSString*) get: (NSString*)attribute;
Description forthcoming.

getChildrenWithName: 

- (NSSet*) getChildrenWithName: (NSString*)_name;
Description forthcoming.

initWithType: 

- (id) initWithType: (NSString*)type;
Initialise a created instance with an XML node name.

initWithType: attributes: 

- (id) initWithType: (NSString*)type attributes: (NSDictionary*)_attributes;
Initialise an instance with the specified node name and attributes.

set: to: 

- (void) set: (NSString*)attribute to: (NSString*)value;
Description forthcoming.

setCData: 

- (void) setCData: (NSString*)newCData;
Description forthcoming.

stringValue 

- (NSString*) stringValue;
Generate an XML string representing the node.

stringValueWithFlags: 

- (NSString*) stringValueWithFlags: (NSDictionary*)flags;
Generate a string representation of the node. Currently the flags are only used to pass a depth when calling this method recursively on child nodes for indenting.

type 

- (NSString*) type;
Description forthcoming.



Instance Variables for TRXMLNode Class

attributes

@protected NSMutableDictionary* attributes;
Description forthcoming.

children

@protected unsigned int children;
Description forthcoming.

childrenByName

@protected NSMutableDictionary* childrenByName;
Description forthcoming.

elements

@protected NSMutableArray* elements;
Description forthcoming.

nodeType

@protected NSString* nodeType;
Description forthcoming.

parent

@protected id parent;
Description forthcoming.

parser

@protected id parser;
Description forthcoming.

plainCDATA

@protected NSMutableString* plainCDATA;
Description forthcoming.