Can someone please help me to compare JAXB with Castor.
Since JAXB supports schema now,Is is fine to go for JAXB. Of Course the spec is still not finalized. Not sure whether the current implementation is bug free.
Castor being a non standard, I am not sure whether it is good to use it in my project.
Thanks in advance.
- XML data binding resources by Sean Sullivan on October 24 2002 06:39 EDT
- Castor works great by Rafiq Abdul on September 14 2004 13:38 EDT
- JAXB compared to Castor by Vipul Manglik on October 26 2004 20:45 EDT
- JAXB vs Castor by Krishna Pothula on January 03 2006 07:47 EST
- Castor Mapping.xml by Rajeswari Shankar on March 07 2006 08:00 EST
- what about XMLBeans by James Lawless on March 09 2006 10:39 EST
Please read: http://jinx.swiki.net/327
I am not sure about the differences. I have used Castor in my project and is working great. Now I am trying to find the differences between Castor and XML Beans.
Following were some of my findings:
1) Castor requires a very small download of 1 zip file. JAXB is part of a rather big download of Java Web Services develoment package and comes as a binary installation.
2) Castor can be used to marshall an existing java object to XML. This is possible because Castor can use reflection for marshalling and unmarshalling. JAXB does not offer this functionality.
3) Both Castor and JAXB can generate java source code from XML schema which can then be used for marshalling and unmarshalling java objects.
4) Castor uses a mapping file that controls what sort of XML tree is generated by marshalling a java object. JAXB uses annotations to XML or an external binding file to control mapping between XML and java.
In summary, if you have existing java classes that you want to serialize to XML and back, Castor will be the only choice. However if you do not have existing java classes, and want to generate them from XML Schema then either of them can be used.
You can find the comparision here.
It seems JAXB's performance is good and Castor's memory management is good. So basically both have flaws.
We are planning to use castor in our project. Can anyone suggest a good tool to generate the mapping.xml?
We are planning to use castor in our project. Can anyone suggest a good tool to generate the mapping.xml?What we did is generate from an XSD. Our XSD contained all the information about the structure of the XML and Element names as class names. Using the SourceGenerator.java we generated the Castor objects. There are a lot of tools to edit XSD files.. so my suggestion is to write a XSD schema file... and then use it to generate Castor objects.
Hi, I used XMLBeans for a similar purpose a while back (maybe 2 years). At the time it was a BEA product. Is it still around and how usable is it outside a BEA env (we're on Oracle 10G AS)? How does it stack up against Castor or JAXB? Thanks. James
Hi, I used XMLBeans for a similar purpose a while back (maybe 2 years). At the time it was a BEA product. Is it still around and how usable is it outside a BEA env (we're on Oracle 10G AS)? How does it stack up against Castor or JAXB? Thanks. JamesWe are using XML Beans in a non-BEA enviroment.. they are working great :)