permaculture playing cards
The moose likes XML and Related Technologies and the fly likes Difference in Xerces and JAXP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Difference in Xerces and JAXP" Watch "Difference in Xerces and JAXP" New topic

Difference in Xerces and JAXP

Maky Chopra
Ranch Hand

Joined: Apr 11, 2001
Posts: 149
Forgive me for asking I'm new to XML.. I have an understanding that Xerces and JAXP are both XML parsers, that have its own API's. They both implement certain standard W3 interfaces and hence return similar objects.
While learning, what should I use ? Do i need to know both of them ? Can I go from using one to the other easily ?
If I write a JAVA program to use JAXP, can I use XERCES to run it or are the classes different ?
Thanks for your help !
Ambrose Tati
Ranch Hand

Joined: Oct 03, 2000
Posts: 55
Hi there,
Yes Xerces is an XML parser but JAXP is not. Without a XML parser you cannot parse with JAXP. It simple provides means through which you "hook" to a parser. JAXP itself comes with an XML parser (SUN's XML parser), so that it is ready to use, but the parser itself is not part of JAXP. Using JAXP you can swap XML parsers without even recompiling your code. That's the beauty of JAXP. Check SUN site out for more info and/or tutorials.
Good luck.
Ambrose Tati
I agree. Here's the link:
subject: Difference in Xerces and JAXP
It's not a secret anymore!