Home : WDD : XML
|
Java XML Technologies
There seems to be a lot of confusion over many Java XML technologies. Some of the words you might have heard: JAXP, Crimson, Xerces, JDOM, JAXB, XMLBeans, Castor.
This article is a short clarificatory note on these technologies.
-
JAXP: This is abstraction interface over various XML parsers. Since each standard based parser implement interfaces from this package, one can use these interfaces while programming.
-
Crimson, Xerces: They are diferent XML parsers available for Java. There are many more parsers available for Java.
-
JDOM: The DOM API introduced many new classes and unwanted complexity. JDOM is a OpenSource project aimed at creating a Java friendly API for parsing XML document.
Another popular project which is a fork from this one is DOM4J.
-
JAXB: The lazy Java programmers found parsing XML through a simplified API like JDOM also boring. So they came up with a technology called "Java API For XML Binding" (JAXB).
Here what you do is give the XML schema to a JAXB generator, it generates corresponding Java Bean classes. So now you can use XML documents just like any other Java
classes.
-
XMLBeans, Castor: These are some of the OpenSource Java-XML binding frameworks.
-
Anything Simpler?: Don't have XML schemas defined for JAXB-like parsing? No probs! There are a couple of projects to simplify to the next level: Commons Digester [a quick tutorial is available at http://www.onjava.com/pub/a/onjava/2002/10/23/digester.html] and XStream [tutorial http://xstream.codehaus.org/tutorial.html].
|