Table of Contents

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 string

namespace URI of the document element to create.

qualifiedName string

qualified name of the document element to be created.

doctype IDocumentType

type of document to be created or null. When doctype is not null, its OwnerDocument attribute is set to the document being created.

Returns

IDocument

A new IDocument object.

Exceptions

DomException

INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character.

NAMESPACE_ERR: Raised if the qualifiedName is malformed, if the qualifiedName has a prefix and the namespaceURI is null, or if the qualifiedName has a prefix that is "xml" and the namespaceURI is different from https://www.w3.org/XML/1998/namespace.

WRONG_DOCUMENT_ERR: Raised if doctype has already been used with a different document or was created from a different implementation.