Method CreateDocument
- Namespace
- SharpVectors.Dom
- Assembly
- SharpVectors.Core.dll
CreateDocument(string, string, IDocumentType)
Creates an XML IDocument object of the specified type with its document element. HTML-only DOM implementations do not need to implement this method.
IDocument CreateDocument(string namespaceURI, string qualifiedName, IDocumentType doctype)
Parameters
namespaceURI
stringnamespace URI of the document element to create.
qualifiedName
stringqualified name of the document element to be created.
doctype
IDocumentTypetype of document to be created or null. When
doctype
is not null, its OwnerDocument attribute is set to the document being created.
Returns
Exceptions
- DomException
INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character.
NAMESPACE_ERR: Raised if the
WRONG_DOCUMENT_ERR: Raised ifqualifiedName
is malformed, if thequalifiedName
has a prefix and thenamespaceURI
is null, or if thequalifiedName
has a prefix that is "xml" and thenamespaceURI
is different from https://www.w3.org/XML/1998/namespace.doctype
has already been used with a different document or was created from a different implementation.