aspose file tools*
The moose likes XML and Related Technologies and the fly likes JAXP and Xerces or JAXB 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 "JAXP and Xerces or JAXB" Watch "JAXP and Xerces or JAXB" New topic
Author

JAXP and Xerces or JAXB

Shane Lee
Ranch Hand

Joined: Mar 19, 2005
Posts: 63
Just enquiring on reading in an xml file and mapping to java objects, which way is better, JAXP and Xerces or JAXB on a JEE5 application?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61764
    
  67

JAXB is now part of Java 6 so it's easier to use than having to configure JEE.

I've just started using it, and while it's a bit cantankerous, it's a lot better (in my opinion) than having to roll your own.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Shane Lee
Ranch Hand

Joined: Mar 19, 2005
Posts: 63
Thanks for that. Do you have a sample build.xml file to use in an IDE, as i will not be doing the java bindings on the command line?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61764
    
  67

Here's the ant task I use to generate the representation classes:


Don't ask too many question about it... it took me a while to tinker it to do what I wanted, and I'm not sure I understand it all 100%.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAXP and Xerces or JAXB