The Document interface contains methods and properties that apply to entire XML document.

The nodeType value is 9.

XML Document interface methods and properties

Name Description
childNodes Property that returns a list of child nodes.
firstChild Property that returns the first child node.
getElementById() Method that returns an element by 'id' attribute.
getElementsByTagNameNS() Method that returns an array of nodes of all elements with given name and namespace.
importNode() Method that imports nodes from other XML document.
lastChild Property that returns the last child node.
nodeName

Property that returns the name of the node.

nodeType Property that returns the type of the node.
nodeValue Property that returns the value of the node.