Public Member Functions | Static Public Member Functions | Protected Attributes

OFXMLElement Class Reference

A class which stores an XML element. More...

#import <OFXMLElement.h>

Inheritance diagram for OFXMLElement:
OFObject

List of all members.

Public Member Functions

(id) - initWithName:
(id) - initWithName:stringValue:
(id) - initWithName:namespace:
(id) - initWithName:namespace:stringValue:
(id) - initWithCharacters:
(id) - initWithCDATA:
(id) - initWithComment:
(OFString *) - name
(OFString *) - namespace
(OFArray *) - attributes
(OFArray *) - children
(OFString *) - stringValue
(void) - addAttribute:
(void) - addAttributeWithName:stringValue:
(void) - addAttributeWithName:namespace:stringValue:
(void) - setPrefix:forNamespace:
(void) - bindPrefix:forNamespace:
(void) - setDefaultNamespace:
(void) - bindDefaultNamespace:
(void) - addChild:

Static Public Member Functions

(id) + elementWithName:
(id) + elementWithName:stringValue:
(id) + elementWithName:namespace:
(id) + elementWithName:namespace:stringValue:
(id) + elementWithCharacters:
(id) + elementWithCDATA:
(id) + elementWithComment:

Protected Attributes

OFStringname
OFStringns
OFStringdefaultNamespace
OFMutableArrayattributes
OFMutableDictionarynamespaces
OFMutableArraychildren
OFStringcharacters
OFStringcdata
OFMutableStringcomment

Detailed Description

A class which stores an XML element.


Member Function Documentation

- (void) addAttribute: (OFXMLAttribute*)  attr  

Adds the specified attribute.

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

Adds the specified attribute with the specified namespace and value.

Parameters:
name The name of the attribute
ns The namespace of the attribute
value The value of the attribute
- (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
- (OFArray*) attributes  
Returns:
An OFArray with the attributes of the element
- (void) bindDefaultNamespace: (OFString*)  ns  

Binds the default namespace for the element.

Parameters:
ns The default namespace for the element
- (void) bindPrefix: (OFString*)  prefix
forNamespace: (OFString*)  ns 

Binds a prefix for a namespace.

Parameters:
prefix The prefix for the namespace
ns The namespace for which the prefix is bound
- (OFArray*) children  
Returns:
An array with all children of the element
+ (id) elementWithCDATA: (OFString*)  cdata  

Creates a new element, only consisting of the specified CDATA.

Parameters:
cdata The CDATA the element represents
Returns:
A new autoreleased OFXMLElement consisting of the specified CDATA
+ (id) elementWithCharacters: (OFString*)  chars  

Creates a new element, only consisting of the specified characters.

Parameters:
chars The characters the element represents
Returns:
A new autoreleased OFXMLElement consisting of the specified characters
+ (id) elementWithComment: (OFString*)  comment  

Creates a new element, only consisting of the specified comment.

Parameters:
comment The comment the element represents
Returns:
A new autoreleased OFXMLElement consisting of the specified comment
+ (id) elementWithName: (OFString*)  name  
Parameters:
name The name for the element
Returns:
A new autoreleased OFXMLElement with the specified element name
+ (id) elementWithName: (OFString*)  name
namespace: (OFString*)  ns 
Parameters:
name The name for the element
ns The namespace for the element
Returns:
A new autoreleased OFXMLElement with the specified element name and namespace
+ (id) elementWithName: (OFString*)  name
namespace: (OFString*)  ns
stringValue: (OFString*)  stringval 
Parameters:
name The name for the element
ns The namespace for the element
stringval The value for the element
Returns:
A new autoreleased OFXMLElement with the specified element name, namespace and value
+ (id) elementWithName: (OFString*)  name
stringValue: (OFString*)  stringval 
Parameters:
name The name for the element
stringval The value for the element
Returns:
A new autoreleased OFXMLElement with the specified element name and value
- (id) initWithCDATA: (OFString*)  cdata  

Initializes an already allocated OFXMLElement so that it only consists of the specified CDATA.

Parameters:
cdata The CDATA the element represents
Returns:
An initialized OFXMLElement consisting of the specified CDATA
- (id) initWithCharacters: (OFString*)  chars  

Initializes an already allocated OFXMLElement so that it only consists of the specified characters.

Parameters:
chars The characters the element represents
Returns:
An initialized OFXMLElement consisting of the specified characters
- (id) initWithComment: (OFString*)  comment  

Initializes an already allocated OFXMLElement so that it only consists of the specified comment.

Parameters:
comment The comment the element represents
Returns:
An initialized OFXMLElement consisting of the specified comment
- (id) initWithName: (OFString*)  name  

Initializes an already allocated OFXMLElement with the specified element name.

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

Initializes an already allocated OFXMLElement with the specified element name and namespace.

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

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

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

Initializes an already allocated OFXMLElement with the specified element 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*) name  
Returns:
The name of the element
- (OFString *) namespace  
Returns:
The namespace of the element
- (void) setDefaultNamespace: (OFString*)  ns  

Sets the default namespace for the element.

Parameters:
ns The default namespace for the element
- (void) setPrefix: (OFString*)  prefix
forNamespace: (OFString*)  ns 

Sets a prefix for a namespace.

Parameters:
prefix The prefix for the namespace
ns The namespace for which the prefix is set
- (OFString *) stringValue  
Returns:
A new autoreleased OFString representing the OFXMLElement as an XML string

The documentation for this class was generated from the following files:
 All Classes Functions Variables