my dog learned polymorphism
The moose likes XML and Related Technologies and the fly likes Favorite java-xml mapping tool ? 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 "Favorite java-xml mapping tool ?" Watch "Favorite java-xml mapping tool ?" New topic

Favorite java-xml mapping tool ?

Sol Mayer-Orn
Ranch Hand

Joined: Nov 13, 2002
Posts: 311
I'm looking for a good tool capable of xml serialization/deserialization -namely, coverting java classes to XML and vise versa. It may rely on binding of scheam/DTD, but it doesn't have to.

It would be nice to have added features, such as:
- Configure tag names (e.g. change <employees> tag to <workers> even though the java property is called "employees")
- Support for relationships. For instance, if Company holds a list of Employees, and each Employee has a reference back to its parent company, it would be nice if the XML serializer deals with it without going into an infinite loop, and without loosing the relationship on de-serialization.

I've started considering either Castor or Betwix, but haven't had the time yet to have a good look at them. Recommendations would be most appreciated.

Thanx a lot in advance.
Jez Nicholson
Ranch Hand

Joined: Oct 01, 2002
Posts: 39
Sol Mayer-Orn
Ranch Hand

Joined: Nov 13, 2002
Posts: 311
Thank you!
Arun Prasath
Ranch Hand

Joined: Sep 17, 2003
Posts: 192
You can also do the same using JAXB, Quick, or zeus

A good article on different tools is available at this url
[ June 24, 2004: Message edited by: Arun Prasath ]

SCJP 1.4, SCDJWS , SCJA<br />I can do ALL things through CHRIST who strengthens me.
Sol Mayer-Orn
Ranch Hand

Joined: Nov 13, 2002
Posts: 311
Thanks for the great link
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
Try Betwixt -- and let me know how it works out.

I agree. Here's the link:
subject: Favorite java-xml mapping tool ?
jQuery in Action, 3rd edition