This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design 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