Construct a string representing the name hierarchy path for a node.