/** * cloneNode method * * @return org.w3c.dom.Node * @param deep * boolean */ public Node cloneNode(boolean deep) { DocumentTypeImpl cloned = new DocumentTypeImpl(this); notifyUserDataHandlers(UserDataHandler.NODE_CLONED, cloned); return cloned; }
/** * createDoctype method * * @return org.w3c.dom.DocumentType * @param name * java.lang.String */ public DocumentType createDoctype(String name) { DocumentTypeImpl docType = new DocumentTypeImpl(); docType.setOwnerDocument(this); docType.setName(name); return docType; }
/** * Creates an empty <code>DocumentType</code> node. Entity declarations * and notations are not made available. Entity reference expansions and * default attribute additions do not occur. It is expected that a future * version of the DOM will provide a way for populating a * <code>DocumentType</code>.<br> * HTML-only DOM implementations do not need to implement this method. * * @param qualifiedNameThe * qualified name of the document type to be created. * @param publicIdThe * external subset public identifier. * @param systemIdThe * external subset system identifier. * @return A new <code>DocumentType</code> node with * <code>Node.ownerDocument</code> set to <code>null</code>. * @exception DOMException * INVALID_CHARACTER_ERR: Raised if the specified qualified * name contains an illegal character. <br> * NAMESPACE_ERR: Raised if the <code>qualifiedName</code> * is malformed. * @see DOM Level 2 */ public DocumentType createDocumentType(String qualifiedName, String publicId, String systemId) throws DOMException { DocumentTypeImpl documentType = new DocumentTypeImpl(); documentType.setName(qualifiedName); documentType.setPublicId(publicId); documentType.setSystemId(systemId); return documentType; }