Adds a comment to this document and returns the new comment.
Adds a declaration to this document and returns the new declaration.
Adds a document type definition to this document and returns the new document type definition.
Adds the root element to this document and returns the element.
Adds a processing instruction to this document and returns the new processing instruction.
Returns an XML string representation of this document using the specified options.
Generated using TypeDoc
Represents a document.
A sample document is structured as follows:
Each component of the document, such as the declaration, document type definition, and root element, are children of this node.
Documents must have exactly one element, which is the document's root element.
Documents can have exactly one declaration and one document type definition in that order, so long as they precede the element.
Documents can have an unlimited number of comments or processing instructions, so long as they follow the declaration, if one exists.