createDocument: namespaceURI, qualifiedName,
doctype(2)
Creates a new, empty Document
object with the given document
type. It also creates the single, top-level document element using
the given qualified name and namespace URI.
The namespace URI used to create the top-level
document element. Can be null
if no namespace is
used.
The namespace-aware qualified name of the top-level
document element to be created. The prefix given in this
parameter is associated with the namespace URI given in the
namespaceURI
parameter.
The document type definition object to be associated
with the new document. If this parameter is not null
, the DocumentType
node's ownerDocument
attribute is set to
point to the new document object.
Indicates that the qualifiedName
parameter has a
malformed XML identifier.
Raised if an inconsistency exists between the values
given for the namespaceURI
and the qualifiedName
parameters. Passing
in a qualified name with a namespace prefix and not passing
in a namespace URI is illegal. This can also be generated if
a reserved namespace prefix, such as xml
, is given with an incorrect
namespace URI.
Raised if the DocumentType
node passed in the
doctype
parameter is
already associated with another document object. New
DocumentType
objects must
be created using the new createDocumentType
method of the
DOMImplementation
interface.