I have seen examples of usage of a getNodePath() method on PHP DOM objects.
see:
http://www.php.net/manual/en/class.domdocument.php#91072
However i cannot find the documentation for that method.
I have been going around in circles in the DOM Docs.
http://www.php.net/manual/en/book.dom.php
Any ideas?