• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Difference between JAXB and JAXP

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All
 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks..
 
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Muthu, you rock !!!
 
Ranch Hand
Posts: 246
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Ulf!
reply
    Bookmark Topic Watch Topic
  • New Topic