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

Java to XML

 
Deepak Kaul
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the best way to convert a Java Object (representing a object graph) to a XML?
 
Tony Morris
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At the moment, the best way is to use a third party, such as JSX.
If you adhere to the (broken) JavaBeans spec., you can use XMLEncoder/XMLDecoder to derive a partially optimal solution.
 
agilan palani
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I know why are not suggesting JAXB?
 
Paulo Aquino
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
XStream?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic