| Returns the Attribute key. |
Signature: getName() |
Returns:
String - The Attribute key.
|
Example:
The key of the attribute is returned: $myKey = $myAttr->getName(); |
| Returns the Attribute value. |
Signature: getValue() |
Returns:
String - The Attribute value.
|
Example:
The value of the attribute is returned: $myValue = $myAttr->getValue(); |
| Sets the Attribute value. |
Signature: setValue($value) |
Parameters:
String value - The new value for the Attribute.
|
Example:
The attribute is given a new value of "12345": $myAttr->setValue("12345"); |
| Returns a copy of the specified node, and if $deep is set to true, all nodes below it in the hierarchy. |
Signature: &cloneNode($deep) |
Parameters:
boolean deep - True if the children below the cloned node are also to be cloned.
|
Returns:
DOMIT_Node - The cloned node, with a clone of all subnodes if $deep is set to true.
|
Example:
In the following example, a node named $styleTemplate is cloned, presumably so the user can create a new style based on the characteristics of the original node. $newStyle =& styleTemplate->cloneNode(false); |
| Generates an unformatted (single line, no whitespace) string representation of the attribute. |
Signature: toString($htmlSafe = false, $subEntities = false) |
Parameters:
boolean htmlSafe - If true, returns an html formatted representation of the string.
boolean subEntities - True if illegal xml characters should be converted to entities.
|
Returns:
String - An unformatted (single line, no whitespace) string representation of the attribute.
|
Example:
An unformatted string representation of the attribute will be printed here: echo ($myAttr->toString(true); |