This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes XML and Related Technologies and the fly likes Java to XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Java to XML" Watch "Java to XML" New topic

Java to XML

Deepak Kaul

Joined: Nov 08, 2005
Posts: 13
What is the best way to convert a Java Object (representing a object graph) to a XML?
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608
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.

Tony Morris
Java Q&A (FAQ, Trivia)
agilan palani

Joined: Jun 10, 2003
Posts: 11
Can I know why are not suggesting JAXB?
Paulo Aquino
Ranch Hand

Joined: Apr 29, 2002
Posts: 200

Be Afraid...Be very Afraid...
subject: Java to XML