|
The getNodesByNodeValue method of a DOMIT_Document allows you to search
the document tree for nodes containing the specified nodeValue. This is not available in DOMIT! Lite.
This is especially useful for finding text or cdata nodes
containing a certain text value.
You must pass in the node value that you are searching for as well as a contextNode
- a node from which the search should start.
The following example returns a DOMIT_NodeLIst of all nodes in the current document
with a nodeValue of "Robbie Fulks":
Warning! in versions of DOMIT! prior to 0.5, this method returned an array, not a DOMIT_NodeList!
$myNodeList =& $cdCollection->getNodesByNodeValue("Robbie Fulks", $cdCollection);
A single text node containing the text "Robbie Fulks" will be returned.
|