OFXMLElement Class Reference

A representation of an XML element as an object. More...

#import <OFXMLElement.h>

Inheritance diagram for OFXMLElement:
OFObject

List of all members.

Public Member Functions

(id) - initWithName:
(id) - initWithName:stringValue:
(OFString *) - string
(void) - addAttribute:
(void) - addAttributeWithName:stringValue:
(void) - addChild:

Static Public Member Functions

(id) + elementWithName:
(id) + elementWithName:stringValue:

Protected Attributes

OFStringname
OFMutableArrayattributes
OFStringstringValue
OFMutableArraychildren

Detailed Description

A representation of an XML element as an object.

The OFXMLElement represents an XML element as an object which can be modified and converted back to XML again.


Member Function Documentation

- (void) addAttribute: (OFXMLAttribute *)  attr  

Adds the specified attribute.

Parameters:
attr The attribute to add
- (void) addAttributeWithName: (OFString *)  name
stringValue: (OFString *)  value 

Adds the specified attribute with the specified value.

Parameters:
name The name of the attribute
value The value of the attribute
- (void) addChild: (OFXMLElement *)  child  

Adds a child to the OFXMLElement.

Parameters:
child Another OFXMLElement which is added as a child
+ (id) elementWithName: (OFString *)  name  
Parameters:
name The name for the element
Returns:
A new autorelease OFXMLElement with the specified element name
+ (id) elementWithName: (OFString *)  name
stringValue: (OFString *)  stringval 
Parameters:
name The name for the element
stringval The value for the element
Returns:
A new autorelease OFXMLElement with the specified element name and value
- (id) initWithName: (OFString *)  name  

Initializes an already allocated OFXMLElement with the specified name.

Parameters:
name The name for the element
Returns:
An initialized OFXMLElement with the specified element name
- (id) initWithName: (OFString *)  name
stringValue: (OFString *)  stringval 

Initializes an already allocated OFXMLElement with the specified name and value.

Parameters:
name The name for the element
stringval The value for the element
Returns:
An initialized OFXMLElement with the specified element name and value
- (OFString*) string  
Returns:
A new autoreleased OFString representing the OFXMLElement as an XML string

The documentation for this class was generated from the following file:
 All Classes Functions Variables
Generated on Sun May 9 16:52:22 2010 for ObjFW by  doxygen 1.6.3