Possible Duplicate:
What is the best/simplest way to read in an XML file in Java application?
How do I convert XML to POJO and vice versa? does axis2 provide that capability? or does java already have built-in capability for this? or any other framework? thanks
I really encourage you to use JAXB.
JAXB is an annotation framework that maps Java classes to XML and XML schema (and viceversa). It is extremely useful because instead of interacting with an abstract representation of an XML document, you can work with real Java objects that are closer to the domain you are modeling.
If you alos need to build a RESTful web-service, with automatic serialization/deserialization of Java Objects into XML, through JAXB, I also suggest you the reading of this book:
Oreilly RESTful Java with JAX-RS - (Chapter 6. JAX-RS Content Handlers)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With