O'Reilly logo

Enterprise Application Integration With XML and Java™ by Bill la Forge, JP Morgenthal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3.4. W3C Document Object Model

Like SAX, the Document Object Model (DOM) is another way that applications can access the data found inside an XML document. However, instead of the application getting the data directly with event handlers, DOM creates an in-memory tree of objects that the applications can traverse to extract the information at will.

As you may remember from our parsing example at the beginning of this chapter, as part of parsing an XML document, we can create a hierarchical representation in memory of that document consisting of Java objects. The W3C Document Object Model, or DOM, uses this hierarchical representation to allow developers to further manipulate an XML document.

The DOM has three core functions to XML: 1) it represents ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required