ObjFW
|
A class which stores an XML element. More...
#include <OFXMLElement.h>
A class which stores an XML element.
void OFXMLElement::addAttribute: | ( | OFXMLAttribute* | attr | ) | [virtual] |
Adds the specified attribute.
If an attribute with the same name and namespace already exists, it is not added.
attr | The attribute to add |
void OFXMLElement::addAttributeWithName:namespace:stringValue: | ( | OFString* | name, |
[namespace] OFString* | ns, | ||
[stringValue] OFString* | value | ||
) | [virtual] |
Adds the specified attribute with the specified namespace and value.
If an attribute with the same name and namespace already exists, it is not added.
name | The name of the attribute |
ns | The namespace of the attribute |
value | The value of the attribute |
void OFXMLElement::addAttributeWithName:stringValue: | ( | OFString* | name, |
[stringValue] OFString* | value | ||
) | [virtual] |
Adds the specified attribute with the specified value.
If an attribute with the same name and namespace already exists, it is not added.
name | The name of the attribute |
value | The value of the attribute |
void OFXMLElement::addChild: | ( | OFXMLElement* | child | ) | [virtual] |
Adds a child to the OFXMLElement.
child | Another OFXMLElement which is added as a child |
OFXMLAttribute * OFXMLElement::attributeForName: | ( | OFString* | attrname | ) | [virtual] |
attrname | The name of the attribute |
OFXMLAttribute * OFXMLElement::attributeForName:namespace: | ( | OFString* | attrname, |
[namespace] OFString* | attrns | ||
) | [virtual] |
attrname | The name of the attribute |
attrns | The namespace of the attribute |
OFArray* OFXMLElement::attributes | ( | ) | [virtual] |
void OFXMLElement::bindPrefix:forNamespace: | ( | OFString* | prefix, |
[forNamespace] OFString* | ns | ||
) | [virtual] |
Binds a prefix for a namespace.
prefix | The prefix for the namespace |
ns | The namespace for which the prefix is bound |
OFArray* OFXMLElement::children | ( | ) | [virtual] |
OFXMLElement * OFXMLElement::elementForName: | ( | OFString* | elemname | ) | [virtual] |
elemname | The name of the element |
OFXMLElement * OFXMLElement::elementForName:namespace: | ( | OFString* | elemname, |
[namespace] OFString* | elemns | ||
) | [virtual] |
elemname | The name of the element |
elemns | The namespace of the element |
elemname | The name of the elements |
OFArray * OFXMLElement::elementsForName:namespace: | ( | OFString* | elemname, |
[namespace] OFString* | elemns | ||
) | [virtual] |
elemname | The name of the elements |
elemns | The namespace of the elements |
id OFXMLElement::elementWithCDATA: | ( | OFString* | cdata | ) | [static, virtual] |
Creates a new element, only consisting of the specified CDATA.
cdata | The CDATA the element represents |
id OFXMLElement::elementWithCharacters: | ( | OFString* | chars | ) | [static, virtual] |
Creates a new element, only consisting of the specified characters.
chars | The characters the element represents |
id OFXMLElement::elementWithComment: | ( | OFString* | comment | ) | [static, virtual] |
Creates a new element, only consisting of the specified comment.
comment | The comment the element represents |
id OFXMLElement::elementWithName: | ( | OFString* | name | ) | [static, virtual] |
name | The name for the element |
id OFXMLElement::elementWithName:namespace: | ( | OFString* | name, |
[namespace] OFString* | ns | ||
) | [static, virtual] |
name | The name for the element |
ns | The namespace for the element |
id OFXMLElement::elementWithName:namespace:stringValue: | ( | OFString* | name, |
[namespace] OFString* | ns, | ||
[stringValue] OFString* | stringval | ||
) | [static, virtual] |
name | The name for the element |
ns | The namespace for the element |
stringval | The value for the element |
id OFXMLElement::elementWithName:stringValue: | ( | OFString* | name, |
[stringValue] OFString* | stringval | ||
) | [static, virtual] |
name | The name for the element |
stringval | The value for the element |
id OFXMLElement::elementWithXMLString: | ( | OFString* | str | ) | [static, virtual] |
Parses the string and returns an OFXMLElement for it.
str | The string to parse |
id OFXMLElement::initWithCDATA: | ( | OFString* | cdata | ) | [virtual] |
Initializes an already allocated OFXMLElement so that it only consists of the specified CDATA.
cdata | The CDATA the element represents |
id OFXMLElement::initWithCharacters: | ( | OFString* | chars | ) | [virtual] |
Initializes an already allocated OFXMLElement so that it only consists of the specified characters.
chars | The characters the element represents |
id OFXMLElement::initWithComment: | ( | OFString* | comment | ) | [virtual] |
Initializes an already allocated OFXMLElement so that it only consists of the specified comment.
comment | The comment the element represents |
id OFXMLElement::initWithName: | ( | OFString* | name | ) | [virtual] |
Initializes an already allocated OFXMLElement with the specified element name.
name | The name for the element |
Initializes an already allocated OFXMLElement with the specified element name and namespace.
name | The name for the element |
ns | The namespace for the element |
id OFXMLElement::initWithName:namespace:stringValue: | ( | OFString* | name, |
[namespace] OFString* | ns, | ||
[stringValue] OFString* | stringval | ||
) | [virtual] |
Initializes an already allocated OFXMLElement with the specified element name, namespace and value.
name | The name for the element |
ns | The namespace for the element |
stringval | The value for the element |
id OFXMLElement::initWithName:stringValue: | ( | OFString* | name, |
[stringValue] OFString* | stringval | ||
) | [virtual] |
Initializes an already allocated OFXMLElement with the specified element name and value.
name | The name for the element |
stringval | The value for the element |
id OFXMLElement::initWithXMLString: | ( | OFString* | str | ) | [virtual] |
Parses the string and initializes an already allocated OFXMLElement with it.
str | The string to parse |
OFString* OFXMLElement::name | ( | ) | [virtual] |
OFString * OFXMLElement::namespace | ( | ) | [virtual] |
void OFXMLElement::removeAttributeForName: | ( | OFString* | attrname | ) | [virtual] |
Removes the attribute with the specified name.
attrname | The name of the attribute |
void OFXMLElement::removeAttributeForName:namespace: | ( | OFString* | attrname, |
[namespace] OFString* | attrns | ||
) | [virtual] |
Removes the attribute with the specified name and namespace.
attrname | The name of the attribute |
attrns | The namespace of the attribute |
void OFXMLElement::setChildren: | ( | OFArray* | children | ) | [virtual] |
Removes all children and adds the children from the specified array.
children | The new children to add |
void OFXMLElement::setDefaultNamespace: | ( | OFString* | ns | ) | [virtual] |
Sets the default namespace for the element to be used if there is no parent.
ns | The default namespace for the element |
void OFXMLElement::setPrefix:forNamespace: | ( | OFString* | prefix, |
[forNamespace] OFString* | ns | ||
) | [virtual] |
Sets a prefix for a namespace.
prefix | The prefix for the namespace |
ns | The namespace for which the prefix is set |
void OFXMLElement::setStringValue: | ( | OFString* | value | ) | [virtual] |
Removes all children and sets the string value to the specified string.
value | The new string value for the element |
OFString * OFXMLElement::stringValue | ( | ) | [virtual] |
OFString * OFXMLElement::XMLString | ( | ) | [virtual] |