code: public DocumentPath parent() {
      if (pathElements.size() <= 1) {
        return null;
      }
      return new DocumentPath(this.pathElements.subList(0, pathElements.size() - 1));
    }
docs: Returns a path for the parent of this node.
  
  @return parent node path. If this path is for the root, returns {@code null}.