Class Attr

Node
  |
  +--Attr

public class Attr
extends Node

Class representing the DOM Attr interface.


Field Summary
private  string $name
          The name of the attribute.
DOM-Level 1
private  Node $ownerElement
          A link to the Element object that owns this attribute.
DOM-Level 2
private  boolean $specified
          If this attribute was explicity set in the XML source for the parent element or it is a default value in the DTD (currently not supported by phpXD) specified is true.
DOM-Level 1
private  string $value
          The value of the attribute.
DOM-Level 1
 
Fields inherited from class Node
$attributes, $childNodes, $firstChild, $lastChild, $localName, $namespaceURI, $nextSibling, $nodeID, $nodeName, $nodeType, $nodeValue, $ownerDocument, $parentNode, $prefix, $previousSibling, $readonly
 
Constructor Summary
Attr()
          Constructor of the class.
 
Method Summary
 NOT_SUPPORTED_ERR appendChild(var $newChild)
          This inherited function from Node interface is not supported by the Attr interface.
DOM-Level 1
 string getName()
          Returns the name of the attribute.
DOM-Level 1
 Node getOwnerElement()
          Returns a reference to the owner of the attribute.
DOM-Level 2
 boolean getSpecified()
          Returns true if the attribute was set explicity in the XML Source or in the DTD (not supported).
DOM-Level 1
 string getValue()
          Return the value of the attribute.
DOM-Level 1
 NOT_SUPPORTED_ERR insertBefore(var $newChild, var $refChild)
          This inherited function from Node interface is not supported by the Attr interface.
DOM-Level 1
 NOT_SUPPORTED_ERR replaceChild(var $newChild, var $oldChild)
          This inherited function from Node interface is not supported by the Attr interface.
DOM-Level 1
 void setNodeValue(var $nodeValue)
          Sets the value of the attribute (inherited function from Node interface)
DOM-Level 1
 void setValue(var $value)
          Sets the value of the attribute
DOM-Level 1
 
Methods inherited from class Node
checkDocument, checkHierarchy, cloneNode, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, isSupported, normalize, removeChild, setPrefix
 

Field Detail

$name

private string $name
The name of the attribute.
DOM-Level 1

$ownerElement

private Node $ownerElement
A link to the Element object that owns this attribute.
DOM-Level 2

$specified

private boolean $specified
If this attribute was explicity set in the XML source for the parent element or it is a default value in the DTD (currently not supported by phpXD) specified is true.
DOM-Level 1

$value

private string $value
The value of the attribute.
DOM-Level 1
Constructor Detail

Attr

public Attr()
Constructor of the class.
Method Detail

getName

public string getName()
Returns the name of the attribute.
DOM-Level 1

getOwnerElement

public Node getOwnerElement()
Returns a reference to the owner of the attribute.
DOM-Level 2

getSpecified

public boolean getSpecified()
Returns true if the attribute was set explicity in the XML Source or in the DTD (not supported).
DOM-Level 1

getValue

public string getValue()
Return the value of the attribute.
DOM-Level 1

setValue

public void setValue(var $value)
Sets the value of the attribute
DOM-Level 1
Parameters:
$value - string

setNodeValue

public void setNodeValue(var $nodeValue)
Sets the value of the attribute (inherited function from Node interface)
DOM-Level 1
Overrides:
setNodeValue in class Node
Parameters:
$nodeValue - string

appendChild

public NOT_SUPPORTED_ERR appendChild(var $newChild)
This inherited function from Node interface is not supported by the Attr interface.
DOM-Level 1
Overrides:
appendChild in class Node
Parameters:
$newChild - is passed by reference

insertBefore

public NOT_SUPPORTED_ERR insertBefore(var $newChild,
                                      var $refChild)
This inherited function from Node interface is not supported by the Attr interface.
DOM-Level 1
Overrides:
insertBefore in class Node
Parameters:
$newChild - is passed by reference
$refChild - is passed by reference

replaceChild

public NOT_SUPPORTED_ERR replaceChild(var $newChild,
                                      var $oldChild)
This inherited function from Node interface is not supported by the Attr interface.
DOM-Level 1
Overrides:
replaceChild in class Node
Following copied from class: Node
Parameters:
$newChild - Node
$oldChild - Node