You can even try Apache's XmlBeans which easily converts the xml in to java objects.
Joined: Oct 13, 2005
Welcome to the Ranch Kannan Sekar
Joined: May 26, 2010
Use can use jaxb
Joined: Sep 08, 2006
Thank you Campbell Ritchie.
Joined: Dec 14, 2009
You can use JAXB to read xml and set values in java object. For using jaxb , you need to create xsd files.
There are multiple sites which will tell you how to create xsd files.
Ashish P Gandhi
Joined: May 25, 2010
Actually depends on how complex your xml is....if its very simple xml, then you can just parse the xml and create your object.
If its complex, then JAXb would be a better option, for creating an xsd, there are tools available which make it simpler ( Altova's XMLSpy is a good option for free trial)