DOMIT_Lite_Element DOMIT_Lite_Element(
string
$tagName
)
|
|
DOM Element constructor
Parameters:
|
string |
$tagName: |
The tag name of the element |
Object &cloneNode(
[boolean
$deep = false]
)
|
|
Copies a node and/or its children
Parameters:
|
boolean |
$deep: |
True if all child nodes are also to be cloned |
API Tags:
| Return: | A copy of the node and/or its children |
Redefinition of:
- DOMIT_Lite_Node::cloneNode()
- Copies a node and/or its children
string getAttribute(
string
$name
)
|
|
Gets the value of the specified attribute, if it exists
Parameters:
|
string |
$name: |
The attribute name |
API Tags:
| Return: | The attribute value |
mixed &getElementsByPath(
string
$pattern, [int
$nodeIndex = 0]
)
|
|
Retrieves an element or DOMIT_NodeList of elements corresponding to an Xpath-like expression.
Parameters:
|
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 |
API Tags:
| Return: | A NodeList or single node that matches the pattern |
Redefinition of:
- DOMIT_Lite_Node::getElementsByPath()
- Retrieves an element or DOMIT_NodeList of elements corresponding to an Xpath-like expression.
Object &getElementsByTagName(
string
$tagName
)
|
|
Retrieves a NodeList of child elements with the specified tag name
Parameters:
|
string |
$tagName: |
The matching element tag name |
API Tags:
| Return: | A NodeList of found elements |
void getNamedElements(
Object
&$nodeList, string
$tagName
)
|
|
Adds elements with the specified tag name to a NodeList collection
Parameters:
|
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
Returns the tag name of the element
API Tags:
| Return: | The tag name of the element |
Returns the concatented text of the current node and its children
API Tags:
| Return: | The concatented text of the current node and its children |
Redefinition of:
- DOMIT_Lite_Node::getText()
- Returns the concatented text of the current node and its children
boolean hasAttribute(
string
$name
)
|
|
Determines whether an attribute with the specified name exists
Parameters:
|
string |
$name: |
The name of the attribute |
API Tags:
| Return: | True if the attribute exists |
Collapses adjacent text nodes in entire element subtree
void removeAttribute(
string
$name
)
|
|
Removes the specified attribute
Parameters:
|
string |
$name: |
The name of the attribute to be removed |
void setAttribute(
string
$name, string
$value
)
|
|
Sets the value of the specified attribute; creates a new attribute if one doesn't exist
Parameters:
|
string |
$name: |
The attribute name |
|
string |
$value: |
The desired attribute value |
void setText(
string
$data
)
|
|
If a child text node exists, sets the nodeValue to $data. A child text node is created if none exists
Parameters:
|
string |
$data: |
The text data of the node |
Generates an array representation of the node and its children
API Tags:
| Return: | A representation of the node and its children |
Redefinition of:
- DOMIT_Lite_Node::toArray()
- Generates an array representation of the node and its children
string toString(
[boolean
$htmlSafe = false], [boolean
$subEntities = false]
)
|
|
Generates a string representation of the node and its children
Parameters:
|
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 |
API Tags:
| Return: | The string representation |