This package defines the Java binding to the
core and XML modules of the
DOM API defined by the World
Wide Web Consortium (W3C). DOM stands for Document Object Model, and
the DOM API defines a way to represent an XML document as a tree of
nodes. Java 1.4 supports the Level 2 DOM, and
Java 5.0 adds support for Level 3.
This package includes methods that allow document trees to be
traversed, examined, modified, and built from scratch.
Node is the central interface of the package. All
nodes in a document tree implement this interface, and it defines the
basic methods for traversing and modifying the tree of nodes. Most of
the other interfaces in the package are extensions of
Node that represent specific types of XML content.
The most important and commonly used of these subinterfaces are
Document, Element, and
Text. A Document object serves
as the root of the document tree and defines methods for searching
the tree for elements with a specified tag name or
ID attribute. The Element
interface represents an XML element or tag and has methods for
manipulating the element's attributes. The
Text interface represents a run of plain text
within an Element and has methods for querying or
altering that text. NodeList and
DOMImplementation do not extend
Node but are also important interfaces.
This package is an endorsed standard, which means that it is defined
outside of Sun Microsystems and the Java Community Process but has
been adopted as part of the Java platform. Full
documentation
is available at
http://www.w3.org/TR/DOM-Level-3-Core/. Note
that Java 5.0 also adopts the
bootstrap, events, and
ls (load/save) subpackages. Those subpackages are
not documented in this book because they are only tangentially used
by the rest of the Java platform.