DOM Element constructor
DOMIT_Element
DOMIT_Element
(string $tagName)
-
string
$tagName: The tag name of the element
Copies a node and/or its children
Object
&cloneNode
([boolean $deep = false])
-
boolean
$deep: True if all child nodes are also to be cloned
Redefinition of:
- DOMIT_Node::cloneNode()
- Copies a node and/or its children
Gets the value of the specified attribute, if it exists
string
getAttribute
(string $name)
-
string
$name: The attribute name
Gets a reference to the specified attribute node
Object
&getAttributeNode
(string $name)
-
string
$name: The attribute name
Gets a reference to the specified attribute node
Object
&getAttributeNodeNS
(string $namespaceURI, string $localName)
-
string
$namespaceURI: The attribute namespaceURI
-
string
$localName: The attribute localName
Gets the value of the attribute with the specified namespaceURI and localName, if it exists
string
getAttributeNS
(string $namespaceURI, string $localName)
-
string
$namespaceURI: The namespaceURI
-
string
$localName: The localName
Retrieves an element or DOMIT_NodeList of elements corresponding to an Xpath-like attribute expression (NOT YET IMPLEMENTED!)
mixed
&getElementsByAttributePath
(string $pattern, int $nodeIndex)
-
string
$pattern: The query pattern
-
int
$nodeIndex: If a single node is to be returned (rather than the entire NodeList) the index of that node
Redefinition of:
- DOMIT_Node::getElementsByAttributePath()
- Retrieves an element or DOMIT_NodeList of elements corresponding to an Xpath-like attribute expression (NOT YET IMPLEMENTED!)
Retrieves an element or DOMIT_NodeList of elements corresponding to an Xpath-like expression.
mixed
&getElementsByPath
(string $pattern, int $nodeIndex)
-
string
$pattern: The query pattern
-
int
$nodeIndex: If a single node is to be returned (rather than the entire NodeList) the index of that node
Redefinition of:
- DOMIT_Node::getElementsByPath()
- Retrieves an element or DOMIT_NodeList of elements corresponding to an Xpath-like expression.
Retrieves a NodeList of child elements with the specified tag name
Object
&getElementsByTagName
(string $tagName)
-
string
$tagName: The matching element tag name
Retrieves a NodeList of child elements with the specified namespaceURI and localName
Object
&getElementsByTagNameNS
(string $namespaceURI, string $localName)
-
string
$namespaceURI: The namespaceURI
-
string
$localName: The localName
Adds elements with the specified tag name to a NodeList collection
void
getNamedElements
(Object &$nodeList, string $tagName)
-
Object
&$nodeList: The NodeList collection
-
string
$tagName: The tag name of matching elements
Redefinition of:
- DOMIT_Node::getNamedElements()
- Adds elements with the specified tag name to a NodeList collection
Adds elements with the specified tag name to a NodeList collection
void
getNamedElementsNS
(Object &$nodeList, string $namespaceURI, string $localName)
-
Object
&$nodeList: The NodeList collection
-
string
$namespaceURI: The namespaceURI of matching elements
-
string
$localName: The localName of matching elements
Returns the tag name of the element
string
getTagName
()
Returns the concatented text of the current node and its children
string
getText
()
Redefinition of:
- DOMIT_Node::getText()
- Returns the concatented text of the current node and its children
Adds all child nodes of the specified nodeType to the NodeList
void
getTypedNodes
(Object &$nodeList, string $type)
-
Object
&$nodeList: The NodeList collection
-
string
$type: The nodeType of matching nodes
Redefinition of:
- DOMIT_Node::getTypedNodes()
- Adds all child nodes of the specified nodeType to the NodeList
Adds all child nodes of the specified nodeValue to the NodeList
void
getValuedNodes
(Object &$nodeList, string $value)
-
Object
&$nodeList: The NodeList collection
-
string
$value: The nodeValue of matching nodes
Redefinition of:
- DOMIT_Node::getValuedNodes()
- Adds all child nodes of the specified nodeValue to the NodeList
Determines whether an attribute with the specified name exists
boolean
hasAttribute
(string $name)
-
string
$name: The name of the attribute
Determines whether an attribute with the specified namespaceURI and localName exists
boolean
hasAttributeNS
(string $namespaceURI, string $localName)
-
string
$namespaceURI: The namespaceURI of the attribute
-
string
$localName: The localName of the attribute
Determines whether the element has any atributes
boolean
hasAttributes
()
Redefinition of:
- DOMIT_Node::hasAttributes()
- Determines whether a node has any attributes
Collapses adjacent text nodes in entire element subtree
void
normalize
()
Redefinition of:
- DOMIT_Node::normalize()
- Collapses adjacent text nodes in entire node subtree
Removes the specified attribute
void
removeAttribute
(string $name)
-
string
$name: The name of the attribute to be removed
Removes an attribute node from the current element
Object
&removeAttributeNode
(Object &$oldAttr)
-
Object
&$oldAttr: The attribute node to be removed
Removes the specified attribute
void
removeAttributeNS
(string $namespaceURI, string $localName)
-
string
$namespaceURI: The namespaceURI of the attribute to be removed
-
string
$localName: The localName of the attribute to be removed
Sets the value of the specified attribute; creates a new attribute if one doesn't exist
void
setAttribute
(string $name, string $value)
-
string
$name: The attribute name
-
string
$value: The desired attribute value
Adds an attribute node to the current element
Object
&setAttributeNode
(Object &$newAttr)
-
Object
&$newAttr: The attribute node to be added
Adds an attribute node to the current element (namespace aware)
Object
&setAttributeNodeNS
(Object &$newAttr)
-
Object
&$newAttr: The attribute node to be added
Sets the value of the specified attribute; creates a new attribute if one doesn't exist
void
setAttributeNS
(string $namespaceURI, string $qualifiedName, string $value)
-
string
$namespaceURI: The attribute namespaceURI
-
string
$qualifiedName: The attribute qualifiedName
-
string
$value: The desired attribute value
If a child text node exists, sets the nodeValue to $data. A child text node is created if none exists
void
setText
(string $data)
-
string
$data: The text data of the node
Generates an array representation of the node and its children
Array
toArray
()
Redefinition of:
- DOMIT_Node::toArray()
- Generates an array representation of the node and its children
Generates a string representation of the node and its children
string
toString
([boolean $htmlSafe = false], [boolean $subEntities = true])
-
boolean
$htmlSafe: True if HTML readable output is desired
-
boolean
$subEntities: True if illegal xml characters in text nodes and attributes should be converted to entities
Returns the attribute node whose ID is given by elementId.
Object
&_getElementByID
(string $elementID, boolean $isStrict)
-
string
$elementID: The id of the matching element
-
boolean
$isStrict: True if XML spec is to be strictly adhered to (only attributes xml:id are considered valid)
Inherited Methods
Inherited From DOMIT_ChildNodes_Interface
DOMIT_ChildNodes_Interface::DOMIT_ChildNodes_Interface()
DOMIT_ChildNodes_Interface::appendChild()
DOMIT_ChildNodes_Interface::getElementsByAttribute()
DOMIT_ChildNodes_Interface::insertBefore()
DOMIT_ChildNodes_Interface::removeChild()
DOMIT_ChildNodes_Interface::replaceChild()
DOMIT_ChildNodes_Interface::selectNodes()
DOMIT_ChildNodes_Interface::_getElementsByAttribute()
Inherited From DOMIT_Node
DOMIT_Node::DOMIT_Node()
DOMIT_Node::appendChild()
DOMIT_Node::clearReferences()
DOMIT_Node::cloneNode()
DOMIT_Node::forHTML()
DOMIT_Node::getChildNodeIndex()
DOMIT_Node::getElementsByAttributePath()
DOMIT_Node::getElementsByPath()
DOMIT_Node::getNamedElements()
DOMIT_Node::getText()
DOMIT_Node::getTypedNodes()
DOMIT_Node::getValuedNodes()
DOMIT_Node::hasAttributes()
DOMIT_Node::hasChildNodes()
DOMIT_Node::insertBefore()
DOMIT_Node::isSupported()
DOMIT_Node::normalize()
DOMIT_Node::nvl()
DOMIT_Node::onLoad()
DOMIT_Node::removeChild()
DOMIT_Node::replaceChild()
DOMIT_Node::setOwnerDocument()
DOMIT_Node::toArray()
DOMIT_Node::toNormalizedString()
DOMIT_Node::_constructor()