throw new DomEx (DomEx.HIERARCHY_REQUEST_ERR,
throw new DomDOMException(DOMException.HIERARCHY_REQUEST_ERR,
  private void checkNewChild(Node newChild)  {    if (newChild.getNodeType() == ELEMENT_NODE        && getDocumentElement() != null)      {        throw new DomEx (DomEx.HIERARCHY_REQUEST_ERR,                         "document element already present: " +                         getDocumentElement(), newChild, 0);      }    if (newChild.getNodeType() == DOCUMENT_TYPE_NODE        && getDoctype() != null)      {        throw new DomEx (DomEx.HIERARCHY_REQUEST_ERR,                         "document type already present: " +                         getDoctype(), newChild, 0);      }  }