Constructors
constructor
-
Parameters
Properties
Private _children
Private _validation
_validation: boolean
Methods
comment
-
Parameters
decl
-
Parameters
dtd
-
Parameters
Returns XmlDtd<this>
element
-
Parameters
procInst
-
Parameters
toString
-
Parameters
Returns string
Represents a document.
A sample document is structured as follows:
<?xml version="1.0" encoding="UTF-8"?> <DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>My page title</title> </head> <body> <h1>Welcome!</h1> <p>I hope you enjoy visiting my website.</p> <img src="picture.png"/> </body> </html>
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.