Best XML binding framework or utility?
Hi all,
In my application I am storing all the data into XML file. And I have designed the resource layer entty. Now I want to know which mechanism of object to XML binding is better (like Castor, JAXB etc). So it will be great if some one can suggest me which mapper is better and why.
Thanks in advance
Mithun
[336 byte] By [
MithunKa] at [2007-10-2 8:55:35]

Check out the following articles:
http://www-128.ibm.com/developerworks/library/x-databdopt/index.html
http://www-128.ibm.com/developerworks/xml/library/x-databdopt2/
They compare a number of different data binding implementations in terms of performance, size and ease of use.
Castor and JiBX come out as a good all-round performers, while JAXB carries the clout of being one of the web service tools included in the Java EE 5 specification.
> Castor and JiBX come out as a good all-round
> performers, while JAXB carries the clout of being one
> of the web service tools included in the Java EE 5
> specification.
-1 JAXB. Especially if you use clear case. I don't know if they changed this but the version of I use JAXB produces lines of code that are longer than clear case will accept. This is really annoying as clear case doesn't tell you that, it just gives some vague error about not being able to check in the code.
Also, I don't really consider JAXB a binding framwork. It;s a code generator. And what it generates basically requires lots of hardcoding in order to use it. It's not a flexible solution. You can probably get away with it for small numbers of simple schemas but if you have lots lf different scehmas to deal with I would avoid it like the plague.