Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML directly to java classes

 
Petr Blahos
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at XStream.
 
Daniel Mayer
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alternatives are http://www.castor.org/ and http://jakarta.apache.org/commons/digester/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic