Class DOMIT_Element

Description

A class representing the DOM Element

Located in /includes/domit/xml_domit_parser.php (line 1750)

DOMIT_Node
   |
   --DOMIT_ChildNodes_Interface
      |
      --DOMIT_Element
Method Summary
DOMIT_Element DOMIT_Element (string $tagName)
Object &cloneNode ([boolean $deep = false])
string getAttribute (string $name)
Object &getAttributeNode (string $name)
Object &getAttributeNodeNS (string $namespaceURI, string $localName)
string getAttributeNS (string $namespaceURI, string $localName)
mixed &getElementsByAttributePath (string $pattern, int $nodeIndex)
mixed &getElementsByPath (string $pattern, int $nodeIndex)
Object &getElementsByTagName (string $tagName)
Object &getElementsByTagNameNS (string $namespaceURI, string $localName)
void getNamedElements (Object &$nodeList, string $tagName)
void getNamedElementsNS (Object &$nodeList, string $namespaceURI, string $localName)
string getTagName ()
string getText ()
void getTypedNodes (Object &$nodeList, string $type)
void getValuedNodes (Object &$nodeList, string $value)
boolean hasAttribute (string $name)
boolean hasAttributeNS (string $namespaceURI, string $localName)
boolean hasAttributes ()
void normalize ()
void removeAttribute (string $name)
Object &removeAttributeNode (Object &$oldAttr)
void removeAttributeNS (string $namespaceURI, string $localName)
void setAttribute (string $name, string $value)
Object &setAttributeNode (Object &$newAttr)
Object &setAttributeNodeNS (Object &$newAttr)
void setAttributeNS (string $namespaceURI, string $qualifiedName, string $value)
void setText (string $data)
Array toArray ()
string toString ([boolean $htmlSafe = false], [boolean $subEntities = true])
Object &_getElementByID (string $elementID, boolean $isStrict)
Variables
Methods
Constructor DOMIT_Element (line 1755)

DOM Element constructor

DOMIT_Element DOMIT_Element (string $tagName)
  • string $tagName: The tag name of the element
cloneNode (line 2221)

Copies a node and/or its children

  • return: A copy of the 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
getAttribute (line 1983)

Gets the value of the specified attribute, if it exists

  • return: The attribute value
string getAttribute (string $name)
  • string $name: The attribute name
getAttributeNode (line 2119)

Gets a reference to the specified attribute node

  • return: A reference to the found node, or null
Object &getAttributeNode (string $name)
  • string $name: The attribute name
getAttributeNodeNS (line 2130)

Gets a reference to the specified attribute node

  • return: A reference to the found node, or null
Object &getAttributeNodeNS (string $namespaceURI, string $localName)
  • string $namespaceURI: The attribute namespaceURI
  • string $localName: The attribute localName
getAttributeNS (line 2000)

Gets the value of the attribute with the specified namespaceURI and localName, if it exists

  • return: The attribute value
string getAttributeNS (string $namespaceURI, string $localName)
  • string $namespaceURI: The namespaceURI
  • string $localName: The localName
getElementsByAttributePath (line 1927)

Retrieves an element or DOMIT_NodeList of elements corresponding to an Xpath-like attribute expression (NOT YET IMPLEMENTED!)

  • return: A NodeList or single node that matches the pattern
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!)
getElementsByPath (line 1912)

Retrieves an element or DOMIT_NodeList of elements corresponding to an Xpath-like expression.

  • return: A NodeList or single node that matches the pattern
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.
getElementsByTagName (line 1852)

Retrieves a NodeList of child elements with the specified tag name

  • return: A NodeList of found elements
Object &getElementsByTagName (string $tagName)
  • string $tagName: The matching element tag name
getElementsByTagNameNS (line 1865)

Retrieves a NodeList of child elements with the specified namespaceURI and localName

  • return: A NodeList of found elements
Object &getElementsByTagNameNS (string $namespaceURI, string $localName)
  • string $namespaceURI: The namespaceURI
  • string $localName: The localName
getNamedElements (line 1776)

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
getNamedElementsNS (line 1794)

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
getTagName (line 1767)

Returns the tag name of the element

  • return: The tag name of the element
string getTagName ()
getText (line 1813)

Returns the concatented text of the current node and its children

  • return: 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
getTypedNodes (line 1941)

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
getValuedNodes (line 1962)

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
hasAttribute (line 2088)

Determines whether an attribute with the specified name exists

  • return: True if the attribute exists
boolean hasAttribute (string $name)
  • string $name: The name of the attribute
hasAttributeNS (line 2100)

Determines whether an attribute with the specified namespaceURI and localName exists

  • return: True if the attribute exists
boolean hasAttributeNS (string $namespaceURI, string $localName)
  • string $namespaceURI: The namespaceURI of the attribute
  • string $localName: The localName of the attribute
hasAttributes (line 2110)

Determines whether the element has any atributes

  • return: True if the element has any atributes
boolean hasAttributes ()

Redefinition of:
DOMIT_Node::hasAttributes()
Determines whether a node has any attributes
normalize (line 2177)

Collapses adjacent text nodes in entire element subtree

void normalize ()

Redefinition of:
DOMIT_Node::normalize()
Collapses adjacent text nodes in entire node subtree
removeAttribute (line 2068)

Removes the specified attribute

void removeAttribute (string $name)
  • string $name: The name of the attribute to be removed
removeAttributeNode (line 2161)

Removes an attribute node from the current element

  • return: A reference to the removed node
Object &removeAttributeNode (Object &$oldAttr)
  • Object &$oldAttr: The attribute node to be removed
removeAttributeNS (line 2077)

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
setAttribute (line 2016)

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
setAttributeNode (line 2140)

Adds an attribute node to the current element

  • return: A reference to the newly added node
Object &setAttributeNode (Object &$newAttr)
  • Object &$newAttr: The attribute node to be added
setAttributeNodeNS (line 2150)

Adds an attribute node to the current element (namespace aware)

  • return: A reference to the newly added node
Object &setAttributeNodeNS (Object &$newAttr)
  • Object &$newAttr: The attribute node to be added
setAttributeNS (line 2035)

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
setText (line 1829)

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
toArray (line 2205)

Generates an array representation of the node and its children

  • return: A representation of the node and its children
Array toArray ()

Redefinition of:
DOMIT_Node::toArray()
Generates an array representation of the node and its children
toString (line 2245)

Generates a string representation of the node and its children

  • return: The string representation
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
_getElementByID (line 1878)

Returns the attribute node whose ID is given by elementId.

  • return: The found attribute or null
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()

Documentation generated on Fri, 4 Mar 2005 13:57:49 +1000 by phpDocumentor 1.3.0RC3