Nodes and Tree Structure

A tree structure in memory is the foundation of DOM. The DOM tree is composed of nodes, each of which represents a part of the parsed XML document. The arrangement and types of the nodes form the tree structure that represents a parsed document.

Nodes are represented through the org.w3c.dom.Node interface. Other interfaces are extended from this interface to more specifically represent the various types of nodes required to describe an XML document. An example of this is the org.w3c.dom. Element interface extending the node implementation. This allows methods to be defined that are more relevant to each specific type of node.

For each component of an XML document, a node of the correct type is created and properly placed ...

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.