XML technologies / XML / XML in a Nutshell / DOM reference
(Excerpt from "XML in a Nutshell" by Elliotte Rusty Harold & W. Scott Means)
This reference follows the W3C Document Object Model (DOM) Level 3 Core recommendation of 7 April 2004. The latest version and reported errata are available on the website of W3C DOM Activity.
Warning! The following pages use the symbols (2) and (3) to indicate the DOM level in which a feature became available.
The Document Object Model (DOM) is a language-independent and platform-independent object framework for manipulating structured documents. For more information, see The Document Object Model (DOM). Just as XML is a general specification for creating markup languages, DOM Core defines a general library for manipulating markup-based documents. The W3C DOM is a family of related recommendations covering event handling, styling, tree traversal, manipulation of HTML documents and more. Most build on the basic functionality provided by Core DOM.
DOM presents a document to the programmer as a hierarchy of Node objects. The interface Node is the starting point from which all DOM tree elements are derived. Thus, attributes and methods defined for a node apply to all tree objects. Some methods make sense only for particular object types, but are defined on the node to avoid casts to subtypes. The Node interface defines methods for querying, inserting and removing nodes in the object tree, among others. This makes it much easier to implement generic routines independent of particular object types.
Copyright © 2005 O'Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from the book "XML in a Nutshell" is subject to the same conditions as the printed edition: the work and all its parts are protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de
back to top