/** * NON-DOM * Factory method; creates a DocumentType having this Document * as its OwnerDoc. (REC-DOM-Level-1-19981001 left the process of building * DTD information unspecified.) * * @param qualifiedName * @param publicID * @param systemID * * @throws DOMException(NOT_SUPPORTED_ERR) for HTML documents, where * DTDs are not permitted. (HTML not yet implemented.) */ public DocumentType createDocumentType(String qualifiedName, String publicID, String systemID) throws DOMException { return new DocumentTypeImpl(this, qualifiedName, publicID, systemID); } // createDocumentType(String):DocumentType
/** * Introduced in DOM Level 2. <p> * * Creates an empty DocumentType node. * * @param qualifiedName The qualified name of the document type to be created. * @param publicID The document type public identifier. * @param systemID The document type system identifier. * @since WD-DOM-Level-2-19990923 */ public DocumentType createDocumentType( String qualifiedName, String publicID, String systemID) { // REVISIT: this might allow creation of invalid name for DOCTYPE // xmlns prefix. // also there is no way for a user to turn off error checking. checkQName(qualifiedName); return new DocumentTypeImpl(null, qualifiedName, publicID, systemID); }
public MathML(String qualifiedName, String publicID, String systemID) { this(new CoreDocumentImpl()); CoreDocumentImpl document = (CoreDocumentImpl) document(); document.setXmlEncoding("utf-8"); document.appendChild(new DocumentTypeImpl(document, qualifiedName, publicID, systemID)); }
protected DocumentImpl getDocumentImpl() { DocumentTypeImpl docType = new DocumentTypeImpl(null, "database", null, getSystemId()); DocumentImpl doc = new DocumentImpl(docType); doc.appendChild(doc.createComment(" " + getComment() + " ")); return doc; }
/** * Return the XML Document object that we will serialize to disk */ protected DocumentImpl getDocument(final TableHelper helper, final String tableName) throws SQLException { // Generate the document type DocumentTypeImpl docType = new DocumentTypeImpl(null, "dataset", null, getSystemId()); // Generate an empty document DocumentImpl doc = new DocumentImpl(docType); // Append a comment doc.appendChild(doc.createComment(" " + getComment() + " ")); // Extract the data from the table Element datasetNode = getDatasetNode(helper, doc, tableName); if (datasetNode == null) { // There was no data (zero rows), we are done return null; } // Add the dataset to the document doc.appendChild(datasetNode); // Return what we found return doc; }