Updating xml using java

Oracle XML parsing reads an XML document and uses DOM or SAX APIs to provide programmatic access to its content and structure.

You can use parsing in validating or nonvalidating mode.

updating xml using java-29updating xml using java-4

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.

The degree of compression depends on the type of document: the larger the tags and the lesser the text content, the better the compression.

The Oracle XML parser generates a binary compressed output from an in-memory DOM tree or SAX events generated from an XML document. The goal is to reduce the size of the XML document without losing the structural and hierarchical information of the DOM tree.

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.

The compression algorithm is based on tokenizing the XML tags.

Tags: , ,