File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes XML directly to java classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML directly to java classes" Watch "XML directly to java classes" New topic
Author

XML directly to java classes

Petr Blahos
Ranch Hand

Joined: Apr 28, 2004
Posts: 131
Hi all,

I was wondering if there is a library that will allow me read
xml directly into a structure of Java classes. Example:
Let's have an xml:

And java classes:

This library would read the xml and build the corresponding
structure of classes. Any hints?

Thanks, Petr


Get a better web browser:<br /><a href="http://www.mozilla.org/products/firefox/switch.html" target="_blank" rel="nofollow">http://www.mozilla.org/products/firefox/switch.html</a>
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Take a look at XStream.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Daniel Mayer
Ranch Hand

Joined: Sep 09, 2004
Posts: 103
Alternatives are http://www.castor.org/ and http://jakarta.apache.org/commons/digester/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML directly to java classes