Generating a DOM Tree Scanner

The Document Object Model (DOM) protocol converts an XML document into a collection of objects in your program. You can then manipulate the object model in any way that makes sense. This mechanism is also known as the random access protocol because you can visit any part of the data at any time. You can then modify the data, remove it, or insert new data.

You typically use this protocol in an application that displays an XML document and possibly modifies it. If you are writing servlets and network-oriented programs, you might prefer to use the SAX mechanism because it is the fastest and least memory-intensive mechanism currently available for dealing with XML documents.

Before you can generate a DOM tree scanner that can read your XML files, you must have an external Document Type Definition (DTD) defined for the files that you want to have read.

To generate a DOM tree scanner:

  1. In the Explorer, right-click a DTD node and choose Generate DOM Tree Scanner.
  2. In the following dialog box, supply a name for the DOM scanner file and click OK.

    A node for the DOM scanner file appears in the Explorer, and the file opens in the Source Editor.

For more information on programming with DOM, see the DOM tutorial at http://java.sun.com/xml/docs/tutorial/dom/index.html
See also
The XML Module
Creating an XML Document
Editing an XML Document
Creating a DTD File
Generating a SAX Document Handler


Legal Notices