File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAXP or JAXB

 
Joe Harry
Ranch Hand
Posts: 10045
3
Eclipse IDE Mac PPC Ubuntu
  • 0
  • 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
Pie
Posts: 42966
73
  • 0
  • 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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic