createDocumentType

fun createDocumentType(name: String, publicId: String, systemId: String): DocumentType(source)

The DOMImplementation.createDocumentType() method returns a DocumentType object which can either be used with DOMImplementation.createDocument upon document creation or can be put into the document via methods like Node.insertBefore() or Node.replaceChild().

MDN Reference