This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread 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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Java to XML" Watch "Java to XML" New topic
Author

Java to XML

Deepak Kaul
Greenhorn

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
Greenhorn

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

Joined: Apr 29, 2002
Posts: 200
XStream?


Be Afraid...Be very Afraid...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Java to XML
 
Similar Threads
XML file generation
Write XML using JAVA
Java Object - XML
Convert XSLT Template to XSLT String object
Java Objects to XML