
At first sight, this solution is less natural for the application because it is
not given an explicit tree that matches the file. Instead, the application has
to listen to events and determine which tree is being described.
In practice, both forms of interfaces are helpful but they serve different
goals. Object-based interfaces are ideal for applications that manipulate
XML documents such as browsers, editors, XSL processors, and so on.
Event-based interfaces are geared toward applications that maintain their
own data structure in a non-XML format. For example, event-based inter-
faces are well adapted to applications that import XML documents in data- ...