Model (DOM) Generation of XML
Abstract, with access to the buffer
An extra step of abstraction
By working as a tree, rather than a series of events, DOM makes it easier for developers to rely on API services for information about the document and their location in it.
The DOM sees no start- or end-tags, just node structures which are the result (or origin) of those tags. This removes opportunities for making mistakes.
Since the entire document is available at any given time, it's easy to write tools which validate a DOM against a given DTD or schema.
Memory (and scalability) headaches
Since the entire DOM tree stays in memory, and since these trees are larger than their original documents, it's easy to burn through a lot of memory quickly.
Previous Page <
> Next Page