JAXP Packages What Is JAXP?
XML Overview 2-5
The WebLogic Server default parser the parser included in the JDK 5.0 supports DOM Level 2.0 Core. Programmers who have created programs that use Level 1.0 of
DOM to parse XML documents should read about the changes between the two versions and update their programs accordingly. For detailed information about the
differences, refer to
http:www.w3.orgDOMDOMTR .
2.6 What Is the Streaming API for XML StAX?
In addition to SAX and DOM, you can also parse and generate an XML document using the Streaming API for XML StAX.
StAX is Java Community Process specification that describes a bi-directional API for reading and writing XML. StAX gives parsing control to the programmer by exposing
a simple iterator-based API and an underlying stream of events; the API includes methods such as next and hasNext that allow the programmer to ask for the
next event rather than handle the event in a callback. This gives the programmer more procedural control over the processing of the XML document.
Unlike DOM and SAX, StAX is not yet part of the Java API for XML Processing JAXP.
For detailed information about using StAX, see Chapter 4, Using the Streaming API
for XML StAX.
2.7 What Is JAXP?
The previous section discusses two APIs, SAX and DOM, that programmers can use to parse XML data. The Java API for XML Processing JAXP provides a means to get to
these parsers. JAXP also defines a pluggability layer that allows programmers to use any compliant parser or transformer.
WebLogic Server implements JAXP to facilitate XML application development and the work required to move XML applications built on WebLogic Server to other Web
application servers. JAXP was developed by Sun Microsystems to make XML applications portable; it provides basic support for parsing and transforming XML
documents through a standardized set of Java platform APIs. JAXP 1.2, included in the WebLogic Server distribution, is configured to use the default parser. Therefore, by
default, XML applications built using WebLogic Server use JAXP.
The WebLogic Server distribution contains the interfaces and classes needed for JAXP 1.2. JAXP 1.2 contains explicit support for SAX Version 2 and DOM Level 2.