Creating Document Objects

At this point, we have looked at the theory behind an XML document, how the various objects are laid out, and how we might access them. But how do we create the root document object in the first place? Creating a document is the one area that the W3C did not specify in the DOM Core Level I and, as such, each vendor is free to provide its own mechanism. That is to say that no specific method is defined for creating a DOM document from an XML document. For the remainder of this chapter, we'll examine three different DOM implementations—Sun, IBM, and Oracle. For the majority of the examples, we will be using the Sun implementation. One might speculate that at some point the Sun DOM implementation could become a javax. All ...

Get XML Development with Java™ 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.