klyn.io.xml.dom.XMLDocument._setDocumentType
method
public _setDocumentType(doctype as DocumentType) as Void
Description

Sets the document type while building a document from a parser.

This is intentionally an internal-style API: regular DOM users should create documents through DOMImplementation.createDocument(...).

Parameters
ParameterDescription
doctypeDocument type declaration.
Throws
  • DOMException if document ownership or hierarchy rules are violated.
Example
document = XMLDocument()
document._setDocumentType(XMLDocumentType("root"))