Node − The base datatype of the DOM.
Element − The vast majority of the objects you'll deal with are Elements.
Attr − Represents an attribute of an element.
Text − The actual content of an Element or Attr.
Document − Represents the entire XML document. A Document object is often referred to as a DOM tree.
When you are working with DOM, there are several methods you'll use often −
Document.getDocumentElement() − Returns the root element of the document.
Node.getFirstChild() − Returns the first child of a given Node.
Node.getLastChild() − Returns the last child of a given Node.
Node.getNextSibling() − These methods return the next sibling of a given Node.
Node.getPreviousSibling() − These methods return the previous sibling of a given Node.
Node.getAttribute(attrName) − For a given Node, it returns the attribute with the requested name.