Summary

The Document Object Model, DOM, is a W3C standard API for reading and writing XML and HTML documents represented as trees. DOM is defined in IDL, but there are standard bindings for Java. In DOM, an XML document is represented as a connected tree of Node objects. The root of the tree is a Document object. Other kinds of nodes found in the tree include Element, Text, Comment, ProcessingInstruction, and several more. The basic Node interface provides generic methods to navigate the tree, as well as get the names, values, local names, prefixes, types, and namespace URIs of each node. Not all these properties really make sense for all kinds nodes so many of these methods can return null.

DOM Level 2 does not provide any standard way to parse an existing document, serialize a document onto a stream, or load the parser’s DOMImplementation. Sun’s Java API for XML parsing (JAXP) fills these holes. DOM Level 3 will also add this functionality as a standard part of DOM.


Copyright 2001, 2002 Elliotte Rusty Haroldelharo@metalab.unc.eduLast Modified December 17, 2001
Up To Cafe con Leche