From d619bb8e5e5b4bf98590b040a5357ca943e586f6 Mon Sep 17 00:00:00 2001 From: Peter Cowburn Date: Mon, 31 Oct 2011 22:59:44 +0000 Subject: [PATCH] document DOMNode::getNodePath() git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@318622 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/dom/domnode/getnodepath.xml | 109 ++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 reference/dom/domnode/getnodepath.xml diff --git a/reference/dom/domnode/getnodepath.xml b/reference/dom/domnode/getnodepath.xml new file mode 100644 index 0000000000..6d07497008 --- /dev/null +++ b/reference/dom/domnode/getnodepath.xml @@ -0,0 +1,109 @@ + + + + + + DOMNode::getNodePath + Get an XPath for a node + + + + &reftitle.description; + + public stringDOMNode::getNodePath + + + + Gets an XPath location path for the node. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns a string containing the XPath, or &null; in case of an error. + + + + + &reftitle.examples; + + + <methodname>DOMNode::getNodePath</methodname> example + +loadXML(' + + + braeburn + granny smith + + + conference + + +'); + +// Print XPath for each element +foreach ($dom->getElementsByTagName('*') as $node) { + echo $node->getNodePath() . "\n"; +} +?> +]]> + + &example.outputs; + + + + + + + + + &reftitle.seealso; + + + DOMXPath + + + + + + +