This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAXP or JAXB

 
Joe Harry
Ranch Hand
Posts: 10105
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

In what scenarios do we prefer JAXP over JAXB? I'm currently exploring on JAXB to perform a task and as far as I read through JAXB, I understand that XML processing is straight forward without the need to use SAX or DOM. Given this advantage, what is the need for JAXP?
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are few things that come only with advantages, and no disadvantages :-)

Having JAXB create all those objects carries a performance overhead, plus the need to have all those classes in the first place. Also, SAX code is more stable in the face of changing document structure - if you use JAXB, then your classes need to match the document, or there'll be problems.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic