in reply to finding XPATH for any node in a XML file

If you're using XML::LibXML:
$node->nodePath()

(And if you ever need relative paths, solution)