The compression algorithm is based on tokenizing the XML tags.
The assumption is that any XML document repeats a number of tags and so tokenizing these tags gives considerable compression.
In general, the SAX API provides the following advantages: The JAXP API enables you to plug in an implementation of the SAX or DOM parser.
The SAX and DOM APIs provided in the Oracle XDK are examples of vendor-specific implementations supported by JAXP.
The parser serializes an in-memory DOM tree, corresponding to a parsed XML document, and generates a compressed XML output stream.
The serialized stream regenerates the DOM tree when read back.
Thus JPEG, Word, PDF, RTF, and HTML documents can be more readily stored.
DOM builds an in-memory tree representation of the XML document.
Using pluggable DOM, XML data can be easily moved from one processor to another.
The main disadvantage of JAXP is that it runs more slowly than vendor-specific APIs.
In addition, several features are available through Oracle-specific APIs that are not available through JAXP APIs.
This chapter assumes that you are familiar with the following technologies: JAXP version 1.2 includes an XSLT framework plus some updates to the parsing API to support DOM Level 2 and SAX version 2.0 and an improved scheme to locate pluggable implementations.
JAXP provides support for XML schema and an XSLT compiler.