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
namespaceURIstringnamespace URI of the document element to create.
qualifiedNamestringqualified name of the document element to be created.
doctypeIDocumentTypetype of document to be created or null. When
doctypeis 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 ifqualifiedNameis malformed, if thequalifiedNamehas a prefix and thenamespaceURIis null, or if thequalifiedNamehas a prefix that is "xml" and thenamespaceURIis different from https://www.w3.org/XML/1998/namespace.doctypehas already been used with a different document or was created from a different implementation.