Document Object Model

Document Object Model (DOM) is a form of representation of structured documents as an object-oriented model. DOM is the official World Wide Web Consortium (W3C) standard for representing structured documents in a platform- and language-neutral manner. The DOM is also the basis for a wide range of application programming interfaces, some of which are standardized by the W3C.

DOM was initially supported by web browsers to manipulate elements in a HTML document. DOM was a way of dynamically accessing and updating the content, structure and style of documents. Owing to incompatibilities in the DOM implementation between different browsers, the W3C came up with standard specifications for DOM.

DOM puts no restrictions on the document's underlying data structure. A well-structured document can take the tree form using DOM. Most XML parsers (e.g., Xerces) and XSL processors (e.g., Xalan) have been developed to make use of the tree structure. Such an implementation requires that the entire content of a document be parsed and stored in memory. Hence, DOM is best used for applications where the document elements have to be randomly accessed and manipulated. For XML-based applications which involve a one-time selective read/write per parse, DOM presents a considerable overhead on memory. The SAX model is advantageous in such a case in terms of speed and memory consumption.



The current DOM specification is Level 2, but some of the Level 3 specifications are now W3C Recommendations.

Level 0 
Includes all the vendor-specific DOMs that existed before creation of DOM Level 1, e.g. document.images, document.forms, document.layers, and document.all. Note, this is not a formal specification published by the W3C but rather a reference to what existed before the standardisation process.
Level 1 
Navigation of DOM document and to manipulate content.
Level 2 
XML Namespace support, filtered views and events.
Level 3 
Consists of 6 different specifications: 1) the DOM Level 3 Core; 2) the DOM Level 3 Load and Save; 3) the DOM Level 3 XPath; 4) the DOM Level 3 Views and Formatting; 5) DOM Level 3 Requirements; and 6) the DOM Level 3 Validation, which further enhance the DOM.

Web browser incompatibilities

A different DOM implementation in different browser venders has led to inter-operability problems for web browsers.

As Microsoft's Internet Explorer browser is, as of 2005, the de-facto standard web browser, this poses real problems for the developers of more standards-compliant browsers such as Mozilla. If they adopt the Microsoft extensions to the DOM, they risk losing any credibility in their calls for web-sites to become standards-compliant, and if they do not, they risk alienating their users by losing much or all of the content of web-sites which use the non-standard extensions. Cynics regard this as another case of Microsoft applying embrace, extend and extinguish (EEE) tactics. This could be considered ironic, as both Microsoft and Netscape were guilty of supplying non-standard features in an arms-race for standards control, and Mozilla was born out of a Netscape initiative. Historically speaking, Microsoft's Internet Browser has been more standard compliant than Netscape in every year.

The general consensus appears to be that this will only change if new standards-compliant browsers gain a significant market-share on the Web, thus making the use of non-standard extensions a commercial problem for the authors of non-standards-compliant websites.


See also

  • DOM Events
  • SAX - A set of APIs for accessing and manipulating XML documents in a sequential manner.
  • JDOM - A Java-based document object model for XML that integrates with DOM and SAX and uses parsers to build the document.
  • Comparison of layout engines (DOM)

External links

  • Interfaces for ...
    • C++ (
    • Java ( - W3C Document Object Model Level 2
    • Lisp (
    • Pascal ( (Kylix)
    • Perl (
    • PHP (
    • Python (
    • Ruby (
    • TCL ( Object Model

es:Document Object Model fr:Document Object Model ja:Document Object Model nl:Document Object Model pl:Obiektowy model dokumentu zh:文档对象模型


  • Art and Cultures
    • Art (
    • Architecture (
    • Cultures (
    • Music (
    • Musical Instruments (
  • Biographies (
  • Clipart (
  • Geography (
    • Countries of the World (
    • Maps (
    • Flags (
    • Continents (
  • History (
    • Ancient Civilizations (
    • Industrial Revolution (
    • Middle Ages (
    • Prehistory (
    • Renaissance (
    • Timelines (
    • United States (
    • Wars (
    • World History (
  • Human Body (
  • Mathematics (
  • Reference (
  • Science (
    • Animals (
    • Aviation (
    • Dinosaurs (
    • Earth (
    • Inventions (
    • Physical Science (
    • Plants (
    • Scientists (
  • Social Studies (
    • Anthropology (
    • Economics (
    • Government (
    • Religion (
    • Holidays (
  • Space and Astronomy
    • Solar System (
    • Planets (
  • Sports (
  • Timelines (
  • Weather (
  • US States (


  • Home Page (
  • Contact Us (

  • Clip Art (
Personal tools