The Node object represents an element (tag) in the XML document. As the language is extensible, this object serves as a generic base for any element.
$node = $this->Xml->Node();
The class inheritance for the object.
The configuration parameters for the template.
Name | Type | Default | Description |
---|---|---|---|
name | string | node | Defines the name of the element (tag). |
cdata | boolean | false | Determines if the value of the element is wrapped in a CDATA comment. |
value | string | Defines the value of the element. |
The properties affecting object behavior.
Property | Value | Description |
---|---|---|
Allow parent | true | Determines if the object can have a parent. |
Allow children | true | Determines if the object can have children. |
Allow events | false | Determines if events can be added to the object. |
Limit parent | Defines the allowed parents for the object, or any if none specified. | |
Limit children | Defines the allowed children for the object, or any if none specified. |
The contextual methods for the object.
Method | Returns | Description |
---|---|---|
hasAttribute(string $name) | boolean | Determines if a given attribute has been set. |
getAttribute(string $name) | mixed | Returns an attribute set on the node. |
setAttribute(string $name, mixed $value = null) | XmlNode | Sets an attribute on the node. |
removeAttribute(string $name) | XmlNode | Removes a previously set attribute from the node. |
clearAttributes() | XmlNode | Removes all attributes previously set on the node. |