• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

JAXP vs. Apache

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Last November, Tom Cargill lectured at the Denver Java User's Group about XML. He argued that Apache's XML parser was superior to JAXP, describing JAXP as being "in a state of flux." My notes indicate that the consensus in the DJUG crowd was that JAXP was a leaner JAR and was less flakey than Apache.
Any strong opinions here? Bad stories about one or the other?
[This message has been edited by Tim Berglund (edited January 22, 2001).]
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mainly the current JAXP is only compliant with DOM 1 and SAX 1.
The next version is in beta test as I understand it can can be downloaded from the developer's site.
In general, the Apache XML projects require the Apache parser because they are using interfaces from DOM 2 and SAX 2
Sun will have to become compatible with the next standards very quickly, but right now, you will need the Apache parser if you want to fool around with SOAP, Cocoon, or all the other Apache goodies.
An exception is plain Tomcat which ships with JAXP - lots of confusion if you are using Tomcat with SOAP..... hopefully they will all get compatible quickly.
Bill

------------------
author of:
 
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And don't forget that the Resin web server and servlet container ships with a built in SAX2 and DOM2 parser, as well as a built-in fast compiling XSLT engine and an XML-RPC system which allows the calling of EJBs through HTTP. Why not check it out at http://www.caucho.com/ ?
 
Tim Berglund
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, but does it have a wet bar?
Thanks, Frank, for the pointer. I will look at it. Thank you, too, William, for your detailed help.
Tim
 
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most people have difficulty in distinguishing between the Java API for XML parsing (JAXP) and Sun's XML parser. JAXP is just a higher-level abstraction API which consists of just 6 classes! It's true that JAXP ships with Sun's parser, but you can as well easily use the Xerces parser with JAXP without even needing to re-compile the existing code. JAXP mainly uses the Abstract Factory pattern which gives it this flexibilty & doesn't lock you in with a vendor's parser.
Also note that the latest version 1.1 of JAXP does indeed support SAX2 and level 2 of DOM (although it's a bit late considering that SAX2 was finalized in May 2000). Also it comes with a new TRAX API (Transformation for XML) which will hopefully standardize the way XSL transformations are carried out.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now that bit about TRAX is interesting. I've been battling recently to include XML transformations in a vendor-independent way. I'll check it out.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!