Library for handling data in XML form.
- Since
- 4.0.0
Definition at line 18 of file XML.inc.
static childCount |
( |
DomNode |
$node | ) |
|
|
static |
Returns the number of child nodes for specified node.
- Parameters
-
- Since
- 4.0.0
- Returns
- integer
Definition at line 183 of file XML.inc.
static getChildAt |
( |
DomNode |
$node, |
|
|
|
$position |
|
) |
| |
|
static |
Returns the child element node of the given node at the given position.
- Parameters
-
DomNode | $node | Dom node. |
integer | $position | Position. |
- Since
- 4.0.0
- Returns
- object
Definition at line 157 of file XML.inc.
static getElementsByAttributeValue |
( |
DomDocument |
$doc, |
|
|
DomNode |
$element, |
|
|
|
$attr, |
|
|
|
$value, |
|
|
|
$recursive = TRUE |
|
) |
| |
|
static |
Searches for given attribute value under the given element.
If recusrive set to false then only 1 level will be searched.
- Parameters
-
DomDocument | $doc | Xml document. |
DomNode | $element | Parent element. |
string | $attr | Name of the attribute. |
string | $value | Attribute value. |
boolean | $recursive | Recurse the dom tree. |
- Since
- 4.0.0
- Returns
- DOMNodeList
Definition at line 81 of file XML.inc.
static getElementsByTagNames |
( |
array |
$tagNames, |
|
|
DomNode |
$elem |
|
) |
| |
|
static |
Searches under the passed element for elements of any of the passed type.
- Parameters
-
array | $tagNames | An array of tag names to search for. |
DomNode | $elem | The element to search under. |
- Since
- 4.0.0
- Returns
- array
Definition at line 51 of file XML.inc.
static getFirstChildElement |
( |
DomNode |
$node | ) |
|
|
static |
Returns the first child element node of the given node.
Unlike fisrChild, getFirstChildElement returns the first XML_ELEMENT_NODE. Returns NULL if non found.
- Parameters
-
- Since
- 4.0.0
- Returns
- object
Definition at line 135 of file XML.inc.
static hasChildElements |
( |
DomNode |
$node | ) |
|
|
static |
Returns TRUE if the given node has element node.
Unlike hasChildNodes, hasChildElements returns false if it cannot find a XML_ELEMENT_NODE.
- Parameters
-
- Since
- 4.0.0
- Returns
- boolean
Definition at line 109 of file XML.inc.
static nodeListToArray |
( |
DomNodeList |
$nodeList | ) |
|
|
static |
Converts a DomNodeList to an array containing its' elements.
- Parameters
-
DomNodeList | $nodeList | List of nodes to convert. |
- Since
- 4.0.0
- Returns
- array
Definition at line 30 of file XML.inc.
static setAttributes |
( |
DomElement |
$element, |
|
|
array |
$attributes |
|
) |
| |
|
static |
Allows multiple attributes of a DomElement to be set simultaneously.
- Parameters
-
DomElement | $element | The element to set the attributes for. |
array | $attributes | An associate array of the form: array( $attrname => $attrValue, ..., ). |
- Since
- 4.0.0
- Returns
- DomElement
Definition at line 247 of file XML.inc.
static traverseDom |
( |
DomElement |
$element | ) |
|
|
static |
Traverse DOM tree from given start node.
Returns details about each element it comes across and these elements' children.
- Parameters
-
DomElement | $element | Node to start from. |
- Since
- 4.0.0
- Returns
- array
Definition at line 208 of file XML.inc.
The documentation for this class was generated from the following file:
- /Users/webmaster/Desktop/squiz_matrix/core/lib/XML/XML.inc