The intent of JAXP is to make it easy for the programmer to create a DOM or SAX parser in a way that is independent of the actual parser used. They call it a "pluggable" architecture. This is a big improvement IMHO. The JAXP package does provide the w3c DOM and the SAX (NOT a W3C standard by the way) API implementations. The JAXP 1.2 release is supposed to be compliant with XML 1.0, 2nd Ed, DOM level 2 core recommendations, XML Namespaces, SAX 2.0, SAX2 Extensions version 1.0, and (whew) XSLT 1.0. My! things have gotten complicated in the XML world! Bill
Thanks, Bill. But the APIs from DOM and SAX spce are not quite fix to Java because they written for all languages (including VB, C/C++, ...). Many people think it is not easy to use compared to JDOM and DOM4J that are APIs designed only for Java. BTW, who maintains the spce of SAX?
While it is true that the DOM and SAX specs are not language dependent, much of the early work was done in Java. Not surprising since the originators were working with Java. It certainly is true that manipulating the org.w3c.dom objects is a bit of a pain but it is feasible. The JDOM project is designed to be a little closer to typical Java practice. I am finding the JAXB approach to be pretty powerful - this is an API for creating Java classes that know how to create themselves from an XML document. http://java.sun.com/xml/jaxb/ <- XML binding project I hope to be starting a new book project on Sun's "XML Pack" grouping of XML related APIs, see: http://java.sun.com/xml/javaxmlpack.html which should eventually include JAXB. The SAX Home page for the SAX specification Bill
To continue my line of raising points of tangential interest , this nice article quotes XML-DEV forum who said "less experienced programmers overusing DOM, and no one seemed to represent the contrary position, that of less experienced programmers overusing SAX" Why is SAX difficult for a typical programmer: "A lot of programmers are not really used to event-based programming", and more generally, to "conceptualizing the design of a component as a state-machine." So it's not only (and maybe even not so much) that DOM and SAX are language independent (by the way, if I am not mistaken, SAX was born as a Java API), they are conceptually difficult.