Defining the Document Object Model

The term "model" is one of those all-purpose terms that everyone uses. For our purposes, a model is a representation of an object. Models can be complete, incomplete, or somewhere in between. In the case of DOM, the model represents an XML document. An incomplete model only partially replicates the object it models, whereas a complete model mimics everything down to the smallest detail. In the DOM specification, each element of an XML document is represented, making the DOM a complete model. The DOM also defines a set of interfaces that developers, and perhaps others, can implement allowing concrete programmatic representations of XML documents. In essence, the DOM is three things:

  • Model— The DOM models an XML ...

Get XML Development with Java™ 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.