
Figure 8.1: Architecture of an XML program
Object-Based and Event-Based Interfaces
In Chapter 7, “The Parser and DOM,” you learned that there are two
classes of interfaces for parsers: object-based and event-based interfaces.
✔ The section “Getting Started with DOM” in Chapter 7 introduced DOM as an example of
object-based parser. DOM was developed and published by the W3C.
DOM is an object-based interface: It communicates with the application by
explicitly creating a tree of objects in memory. The tree in memory is an
exact map of the tree of elements in the XML file.
Object-based interfaces, like DOM, are simple because they offer a view
that closely ...