tags:

views:

55

answers:

2

Possible Duplicate:
Java converting XML to Java objects

Hi,

Can someone please suggest the best and different ways of converting a XML file to an Java object?

Thanks & Regards, Ravi.

A: 

You can user available frameworks like Castor or Xstream

I would recommend Xstream considering the simplicity of use. This 2 minute tutorial of Xstream will help you to get started quickly.

Gopi
If I am not wrong, Castor need the XML Schema if you were to create the java object, not sure same for Sstream. Actually, what I am looking for is that if I only have the XML file, no object, then what can I use which can create the java Class for me.
Ravi
A: 

There are a lot of xml-to-java-frameworks around. In the past I've worked a lot with jibx.

Kurt Du Bois