DOMIT_XPath DOMIT_XPath(
)
|
|
Constructor - creates an empty DOMIT_NodeList to store matching nodes
string expressionToPHP(
string
$expression
)
|
|
Converts the predicate expression into a PHP expression
Parameters:
|
string |
$expression: |
The predicate expression |
API Tags:
| Return: | The converted PHP expression |
void filterByChildName(
string
$nodeName, string
$childName, boolean
$deep
)
|
|
Selects named elements with the specified named child
Parameters:
|
string |
$nodeName: |
The pattern segment containing the node expression |
|
string |
$childName: |
The tag name of the matching child |
|
boolean |
$deep: |
True if the selection is to be performed recursively |
void filterByIndex(
string
$nodeName, int
$index, boolean
$deep
)
|
|
Selects named elements of the specified index
Parameters:
|
string |
$nodeName: |
The pattern segment containing the node expression |
|
int |
$index: |
The index (base 1) of the matching node |
|
boolean |
$deep: |
True if the selection is to be performed recursively |
void filterByPHPExpression(
string
$expression
)
|
|
Selects nodes that match the predicate expression
Parameters:
|
string |
$expression: |
The predicate expression, formatted as a PHP expression |
boolean hasNamedChildElement(
object The
&$parentNode, string
$nodeName
)
|
|
Selects nodes with child elements that match the specified name
Parameters:
|
object The |
&$parentNode: |
parent node of the child elements to match |
|
string |
$nodeName: |
The tag name to match on |
API Tags:
| Return: | True if a matching child element exists |
boolean hasNamedChildElementEqualToValue(
object The
&$parentNode, string
$nodeName, string
$nodeValue
)
|
|
Selects nodes with child elements that match the specified name and text value
Parameters:
|
object The |
&$parentNode: |
parent node of the child elements to match |
|
string |
$nodeName: |
The tag name to match on |
|
string |
$nodeValue: |
The text string to match on |
API Tags:
| Return: | True if a matching child element exists |
boolean hasNamedChildElementGreaterThanOrEqualToValue(
object The
&$parentNode, string
$nodeName, string
$nodeValue
)
|
|
Selects nodes with child elements that are greater than or equal to the specified name and value
Parameters:
|
object The |
&$parentNode: |
parent node of the child elements to match |
|
string |
$nodeName: |
The tag name to match on |
|
string |
$nodeValue: |
The text string to match on |
API Tags:
| Return: | True if a matching child element exists |
boolean hasNamedChildElementGreaterThanValue(
object The
&$parentNode, string
$nodeName, string
$nodeValue
)
|
|
Selects nodes with child elements that are greater than the specified name and value
Parameters:
|
object The |
&$parentNode: |
parent node of the child elements to match |
|
string |
$nodeName: |
The tag name to match on |
|
string |
$nodeValue: |
The text string to match on |
API Tags:
| Return: | True if a matching child element exists |
boolean hasNamedChildElementLessThanOrEqualToValue(
object The
&$parentNode, string
$nodeName, string
$nodeValue
)
|
|
Selects nodes with child elements that are less than or equal to the specified name and value
Parameters:
|
object The |
&$parentNode: |
parent node of the child elements to match |
|
string |
$nodeName: |
The tag name to match on |
|
string |
$nodeValue: |
The text string to match on |
API Tags:
| Return: | True if a matching child element exists |
boolean hasNamedChildElementLessThanValue(
object The
&$parentNode, string
$nodeName, string
$nodeValue
)
|
|
Selects nodes with child elements that are less than the specified name and value
Parameters:
|
object The |
&$parentNode: |
parent node of the child elements to match |
|
string |
$nodeName: |
The tag name to match on |
|
string |
$nodeValue: |
The text string to match on |
API Tags:
| Return: | True if a matching child element exists |
boolean hasNamedChildElementNotEqualToValue(
object The
&$parentNode, string
$nodeName, string
$nodeValue
)
|
|
Selects nodes with child elements that are not equal to the specified name and value
Parameters:
|
object The |
&$parentNode: |
parent node of the child elements to match |
|
string |
$nodeName: |
The tag name to match on |
|
string |
$nodeValue: |
The text string to match on |
API Tags:
| Return: | True if a matching child element exists |
int initSearch(
array
&$currArPathSegments
)
|
|
Initializes the contextNode and searchType
Parameters:
|
array |
&$currArPathSegments: |
The current array of path segments |
API Tags:
| Return: | The index of the first array item to begin the search at |
string normalize(
string
$pattern
)
|
|
Converts long XPath syntax into abbreviated XPath syntax
Parameters:
|
string |
$pattern: |
The pattern |
API Tags:
| Return: | The normalized pattern |
Object &parsePattern(
Object
&$node, string
$pattern, [
$nodeIndex = 0]
)
|
|
Parses the supplied "path"-based pattern
Parameters:
|
Object |
&$node: |
The node from which the search is called |
|
string |
$pattern: |
The pattern |
|
|
$nodeIndex: |
|
API Tags:
| Return: | The NodeList containing matching nodes |
void parsePredicate(
string
$nodeName, string
$patternSegment
)
|
|
Parses a predicate expression [...]
Parameters:
|
string |
$nodeName: |
The pattern segment containing the node expression |
|
string |
$patternSegment: |
The pattern segment containing the predicate expression |
string predicateToPHP(
string
$predicate
)
|
|
Converts the predicate into PHP evaluable code
Parameters:
|
string |
$predicate: |
The predicate |
API Tags:
| Return: | The converted PHP expression |
void processPatternSegment(
)
|
|
Generates a new globalNodeContainer of matches
void refilterByIndex(
string
$index, int
1, boolean
2
)
|
|
Selects named elements of the specified index
Parameters:
|
int |
1: |
The index (base 1) of the matching node |
|
boolean |
2: |
True if the selection is to be performed recursively |
|
string |
$index: |
The pattern segment containing the node expression |
void selectAttribute(
string
$attrName
)
|
|
Selects named attributes of the current context nodes
Parameters:
|
string |
$attrName: |
The attribute name, or * to match all attributes |
void selectNamedChild(
string
$tagName
)
|
|
Selects all child nodes of the current context nodes
Parameters:
|
string |
$tagName: |
The element name |
void selectNodesByFunction(
)
|
|
Selects any nodes of the current context nodes which match the given function
Selects parent node of the current context nodes
void splitPattern(
string
$pattern
)
|
|
Splits the supplied pattern into searchable segments
Parameters:
|
string |
$pattern: |
The pattern |
void updateNodeContainers(
)
|
|
Replaces the global node container with the local node container
void _filterByChildName(
object The
&$contextNode, string
$nodeName, string
$childName, boolean
$deep
)
|
|
Selects named elements with the specified named child
Parameters:
|
object The |
&$contextNode: |
context node |
|
string |
$nodeName: |
The pattern segment containing the node expression |
|
string |
$childName: |
The tag name of the matching child |
|
boolean |
$deep: |
True if the selection is to be performed recursively |
void _filterByIndex(
object The
&$contextNode, string
$nodeName, int
$index, boolean
$deep
)
|
|
Selects named elements of the specified index
Parameters:
|
object The |
&$contextNode: |
context node |
|
string |
$nodeName: |
The pattern segment containing the node expression |
|
int |
$index: |
The index (base 1) of the matching node |
|
boolean |
$deep: |
True if the selection is to be performed recursively |
void _selectAttribute(
object The
&$contextNode, string
$attrName, boolean
$deep
)
|
|
Selects all attributes of the context nodes
Parameters:
|
object The |
&$contextNode: |
context node |
|
string |
$attrName: |
The attribute name, or * to match all attributes |
|
boolean |
$deep: |
True if the selection is to be performed recursively |
void _selectNamedChild(
object The
&$contextNode, string
$tagName, [boolean
$deep = false]
)
|
|
Selects all child nodes of the context node
Parameters:
|
object The |
&$contextNode: |
context node |
|
string |
$tagName: |
The element name |
|
boolean |
$deep: |
True if the selection is to be performed recursively |
void _selectParent(
object The
&$contextNode, [boolean
$deep = false]
)
|
|
Selects parent node of the current context nodes
Parameters:
|
object The |
&$contextNode: |
context node |
|
boolean |
$deep: |
True if the selection is to be performed recursively |