What Is the DOM?

The Document Object Model (DOM) is a garden-variety tree structure consisting of a hierarchy of nodes stored in memory. This structure is used to represent the content and model of an XML document. Once a document is parsed using DOM, that tree-like structure will exist in memory, and can then be processed in various ways.

The DOM is a standard issued by the W3C, just like the XML specification. This specification is unrelated to any one programming language, and therefore isn't designed for use with Java specifically. Instead, various bindings of the DOM specification exist for the various programming languages that implement it.

The DOM binding for Java provides APIs that facilitate the manipulation of nodes. Through these ...

Get JSP™ and XML Integrating XML and Web Services in Your JSP™ Application 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.