Class DOMIT_Lite_Element

Description

A class representing the DOM Element

Located in /includes/domit/xml_domit_lite_parser.php (line 1254)

DOMIT_Lite_Node
   |
   --DOMIT_Lite_ChildNodes_Interface
      |
      --DOMIT_Lite_Element
Method Summary
DOMIT_Lite_Element DOMIT_Lite_Element (string $tagName)
Object &cloneNode ([boolean $deep = false])
string getAttribute (string $name)
mixed &getElementsByPath (string $pattern, int $nodeIndex)
Object &getElementsByTagName (string $tagName)
void getNamedElements (Object &$nodeList, string $tagName)
string getTagName ()
string getText ()
boolean hasAttribute (string $name)
void normalize ()
void removeAttribute (string $name)
void setAttribute (string $name, string $value)
void setText (string $data)
Array toArray ()
string toString ([boolean $htmlSafe = false], [boolean $subEntities = true])
Variables
Methods
Constructor DOMIT_Lite_Element (line 1259)

DOM Element constructor

DOMIT_Lite_Element DOMIT_Lite_Element (string $tagName)
  • string $tagName: The tag name of the element
cloneNode (line 1442)

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_Lite_Node::cloneNode()
Copies a node and/or its children
getAttribute (line 1362)

Gets the value of the specified attribute, if it exists

  • return: The attribute value
string getAttribute (string $name)
  • string $name: The attribute name
getElementsByPath (line 1348)

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_Lite_Node::getElementsByPath()
Retrieves an element or DOMIT_NodeList of elements corresponding to an Xpath-like expression.
getElementsByTagName (line 1335)

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
getNamedElements (line 1280)

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_Lite_Node::getNamedElements()
Adds elements with the specified tag name to a NodeList collection
getTagName (line 1271)

Returns the tag name of the element

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

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_Lite_Node::getText()
Returns the concatented text of the current node and its children
hasAttribute (line 1392)

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
normalize (line 1399)

Collapses adjacent text nodes in entire element subtree

void normalize ()
removeAttribute (line 1381)

Removes the specified attribute

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

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

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 1426)

Generates an array representation of the node and its children

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

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

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

Inherited Methods

Inherited From DOMIT_Lite_ChildNodes_Interface

DOMIT_Lite_ChildNodes_Interface::DOMIT_Lite_ChildNodes_Interface()
DOMIT_Lite_ChildNodes_Interface::appendChild()
DOMIT_Lite_ChildNodes_Interface::getElementsByAttribute()
DOMIT_Lite_ChildNodes_Interface::insertBefore()
DOMIT_Lite_ChildNodes_Interface::removeChild()
DOMIT_Lite_ChildNodes_Interface::replaceChild()
DOMIT_Lite_ChildNodes_Interface::_getElementsByAttribute()

Inherited From DOMIT_Lite_Node

DOMIT_Lite_Node::DOMIT_Lite_Node()
DOMIT_Lite_Node::appendChild()
DOMIT_Lite_Node::clearReferences()
DOMIT_Lite_Node::cloneNode()
DOMIT_Lite_Node::forHTML()
DOMIT_Lite_Node::getChildNodeIndex()
DOMIT_Lite_Node::getElementsByPath()
DOMIT_Lite_Node::getNamedElements()
DOMIT_Lite_Node::getText()
DOMIT_Lite_Node::hasChildNodes()
DOMIT_Lite_Node::insertBefore()
DOMIT_Lite_Node::nvl()
DOMIT_Lite_Node::onLoad()
DOMIT_Lite_Node::removeChild()
DOMIT_Lite_Node::replaceChild()
DOMIT_Lite_Node::setOwnerDocument()
DOMIT_Lite_Node::toArray()
DOMIT_Lite_Node::toNormalizedString()
DOMIT_Lite_Node::_constructor()

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