Skip to Content
Java and XML, 3rd Edition
book

Java and XML, 3rd Edition

by Brett McLaughlin, Justin Edelson
December 2006
Intermediate to advanced content levelIntermediate to advanced
479 pages
13h 52m
English
O'Reilly Media, Inc.
Content preview from Java and XML, 3rd Edition

Chapter 6. DOM Modules

Chapter 5 introduced and detailed the DOM API, and specifically what is called the DOM core. This is the portion of DOM that is most used, as it handles basic XML reading, as well as document creation. However, there are times when basic XML isn’t enough—whether you’re working with XML, or writing a document editor, or trying to serialize XML using the latest DOM APIs. In these specialized cases, you will often find a DOM module that can help.

I summarized the complete set of DOM specifications, including DOM modules, in Chapter 5. In this chapter, I’ll detail each module, and show you how you can use these modules in your applications.

Tip

Since DOM Level 3 is still new and largely unsupported, I’ve split coverage of these modules depending on the DOM Level they are based on. Most current parsers support at least a few of the DOM Level 2 modules, and a few will support beta versions of the DOM Level 3 modules.

Checking for Module Support

As a brief refresher (and so you’re not constantly flipping back to Chapter 5), Table 6-1 lists the DOM modules.

Table 6-1. Each module has a specific name used to query a parser for module support
SpecificationModule nameSummary of purpose
DOM Level 2 CoreXMLExtends the DOM Level 1 specification; deals with basic DOM structures like Element, Attr, Document, etc.
DOM Level 2 ViewsViewsProvides a model for scripts to dynamically update a DOM structure
DOM Level 2 EventsEventsDefines an event model for programs and scripts to use in ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java & XML Data Binding

Java & XML Data Binding

Brett McLaughlin
Mastering Java 11 - Second Edition

Mastering Java 11 - Second Edition

Dr. Edward Lavieri Jr., Mandar Jog
XML in a Nutshell, 3rd Edition

XML in a Nutshell, 3rd Edition

Elliotte Rusty Harold, W. Scott Means

Publisher Resources

ISBN: 059610149XSupplemental ContentErrata Page