XML technologies / XML / XML in a Nutshell / The Document Object Model (DOM)

(Excerpt from "XML in a Nutshell" by Elliotte Rusty Harold & W. Scott Means)

The Document Object Model (DOM) defines an API for accessing and manipulating XML documents represented as trees. DOM is based on a series of W3C recommendations describing how hierarchical documents are represented in memory independently of the programming language. DOM 3, the current version (Note from the data2type editors: DOM 4 is available as a Working Draft, as of July 2014), provides a model for manipulating XML and HTML documents or Cascading Stylesheets. We will focus, however, on the parts of DOM relevant to working with XML documents.

The following pages are based on the “Document Object Model (DOM) Level 3 Core” recommendation of 7 April 2004. This version and its reported errata are available on the W3C website. DOM Level 3 introduces important features absent from earlier levels, including:

  1. Validation — programs can now enforce validity constraints while manipulating the DOM tree.

  2. Type information — after validation, element and attribute type information is available through standard DOM interfaces.

  3. Support for XML 1.1 — developers can choose which version of the XML recommendation a DOM document should conform to.

   

  

 

 

 

back to top