This week's book giveaway is in the General Computing forum.
We're giving away four copies of Learning Regular Expressions and have Ben Forta on-line!
See this thread for details.
Win a copy of Learning Regular Expressions this week in the General Computing forum!
  • 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Difference between JAXB and JAXP  RSS feed

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi than mmal ,

Welcome to JavaRanch . I guess you may have to update your display name according to the Ranch's naming policy listed here.

JAXB stands for Java Architecture for XML Binding - as it is used to prepare an equivalent Java object for the XML structure you pass and vice versa through its processes called Marshalling and Unmarshalling.



JAXP stands for Java API for XML Parsing. It is used to parse the XML structure you give. There are two main parsers named DOM and SAX and they have their own pros and cons (+ves and -ves). JAXP helps you to read through the XML document and do some appropriate business actions based on the content.



Hope this helps! You can read more on this in J2EE online documentation (J2EE tutorial) and in Java WebServices tutorial. Just google on it.

[Change] -> Modified the abbreviation of the term JAXB.
[ July 08, 2008: Message edited by: Raghavan Muthu ]
 
Thanammal A
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks..
 
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Muthu, you rock !!!
 
Ranch Hand
Posts: 246
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Co-rancher,

Thanks for the nice explanation. I read somewhere that JAXB stands for Java Architecture for XML Binding. Please re-clarify.

Thanks,

Naveen Katoch
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by nav katoch:


Thanks for the nice explanation. I read somewhere that JAXB stands for Java Architecture for XML Binding. Please re-clarify.



That's correct Naveen. Thank you for correcting! I have adjusted the earlier post!!
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good Day,

Raghavan said -

"There are two main parsers named DOM and SAX and they have their own pros and cons (+ves and -ves)."

Please note that XSLT is also part of JAXP. http://en.wikipedia.org/wiki/Java_API_for_XML_Processing explains it well.

Regards,
Dan
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Dan! I think it has got recently added into the JAXP stack!
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good Day,

When I come to think about this -

What does JAXP add in addition to offering DOM, SAX and XSLT under one roof?

Regards,
Dan
 
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mainly it provides a parser-independent way to obtain SAX or DOM implementations. Before JAXP, each parser had its own wat to provide access to them, so code couldn't trivially be changed to use a particular parser instead of some other.

The latest versions of JAXP also provide support for XPath and StaX.
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Ulf!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!