DOM
From DocForge
DOM (Document Object Model) is a platform- and language-independent standard object model for representing HTML, XML, and related document formats.
DOM is not itself a language, but is a standard by which a programming language may access components of a document. One language with a very close relationship to the DOM is JavaScript. Without the DOM, JavaScript in a web browser would have no clear way to manipulate a web page.
DOM supports navigation in any direction (e.g., parent and previous sibling) and allows for arbitrary modifications. Therefore, an implementation must at least buffer the document that has been read so far (or some parsed form of it). Therefore DOM is likely to be best suited for applications where the document must be accessed repeatedly or out of sequence order. If the application is strictly sequential and one-pass, the SAX model is likely to be faster and use less memory.
[edit] Levels
The W3C DOM specifications are divided into levels, each of which contains required and optional modules. To support a level, an application must implement all the requirements of the level and the levels below it. An application may also support vendor-specific extensions which don't conflict with the W3C standards. As of 2005, Level 1, Level 2, and some modules of Level 3 are W3C Recommendations (i.e. they have reached their final form).
- Level 0
- The application supports an intermediate DOM, which existed before the creation of DOM Level 1. Examples include the DHTML Object Model or the Netscape intermediate DOM. Level 0 is not a formal specification published by the W3C but rather a shorthand that refers to what existed before the standardization process.
- Level 1
- Navigation of DOM (HTML and XML) document as a tree structure and content manipulation. HTML-specific elements are included.
- Level 2
- XML namespace support, filtered views and events.
- Level 3
- Consists of 6 different specifications:
- DOM Level 3 Core
- DOM Level 3 Load and Save
- DOM Level 3 XPath
- DOM Level 3 Views and Formatting
- DOM Level 3 Requirements
- DOM Level 3 Validation
[edit] See Also
- SAX - A set of APIs for accessing and manipulating XML documents in a sequential manner
- AJAX
- JavaScript and ECMAScript
- Mootools - A JavaScript library which extends some basic DOM objects to add functionality

