code: public Document ownerDocument() {
          Node root = root();
          return (root instanceof Document) ? (Document) root : null;
      }
docs: Gets the Document associated with this Node.
  @return the Document associated with this Node, or null if there is no such Document.