Friday, November 9, 2007

An Overview of the Java APIs for XML

An Overview of the APIs
This page gives you a map so you can find your way around JAXP and the associated XML APIs. The first step is to understand where JAXP fits in with respect to the major Java APIs for XML:

JAXP: Java API for XML Processing
This API is the subject of the present tutorial. It provides a common interface for creating and using the standard SAX, DOM, and XSLT APIs in Java, regardless of which vendor's implementation is actually being used..

JAXB: Java Architecture for XML Binding
This standard defines a mechanism for writing out Java objects as XML (marshalling) and for creating Java objects from such structures (unmarshalling). (You compile a class description to create the Java classes, and use those classes in your application.)


JDOM: Java DOM
The standard DOM is a very simple data structure that intermixes text nodes, element nodes, processing instruction nodes, CDATA nodes, entity references, and several other kinds of nodes. That makes it difficult to work with in practice, because you are always sifting through collections of nodes, discarding the ones you don't need into order to process the ones you are interested in. JDOM, on the other hand, creates a tree of objects from an XML structure. The resulting tree is much easier to use, and it can be created from an XML structure without a compilation step. For more information on JDOM, visit http://www.jdom.org. For information on the Java Community Process (JCP) standards effort for JDOM, see JSR 102.


DOM4J
Although it is not on the JCP standards track, DOM4J is an open-source, object-oriented alternative to DOM that is in many ways ahead of JDOM in terms of implemented features. As such, it represents an excellent alternative for Java developers who need to manipulate XML-based data. For more information on DOM4J, see http://www.dom4j.org.

JAXM: Java API for XML Messaging
The JAXM API defines a mechanism for exchanging asynchronous XML-based messages between applications. ("Asynchronous" means "send it and forget it".)

JAX-RPC: Java API for XML-based Remote Process Communications
The JAX-RPC API defines a mechanism for exchanging synchronous XML-based messages between applications. ("Synchronous" means "send a message and wait for the reply".)


JAXR: Java API for XML Registries
The JAXR API provides a mechanism for publishing available services in an external registry, and for consulting the registry to find those services.

1 comment:

Anonymous said...

you may want to look at vtd-xml, the latest and most advanced xml processing api

vtd-xml