Adding support for getPath() method for both Nodes and Properties