2. Document Object Model (Core) Level 1


2.5 Primary API Types

The types described in this section are those that application programmers using the DOM will encounter most frequently. A good working knowledge of these types will be sufficient to accomplish most tasks.

2.5.1 Node

Node is the base type of most objects in the Document Object Model. It may have an arbitrary number (including zero) of sequentially ordered child nodes. It usually has a parent Node; the exception being that the root Node in a document hierarchy has no parent.

2.5.2 Element

Element objects represent the elements in the HTML or XML document. Elements contain, as child nodes, all the content between the start tag, and the end tag of an element. Additionally, Element objects have a list of Attribute objects which represent the combination of those attributes explicitly specified in the document, and those defined in the document type definition which have default values.

2.5.3 DocFragment

The DocFragment object represents the root of a lightweight document or document fragment.

2.5.4 Document

The Document object extends the DocFragment interface to represent the root node of a standalone document.