It's not a secret anymore!
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
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: 202

Be Afraid...Be very Afraid...
I agree. Here's the link:
subject: Java to XML
It's not a secret anymore!