Link to home
Start Free TrialLog in
Avatar of chandu33
chandu33

asked on

how to convert Java object to XML String

Hi Experts

can some help me with an example how to convert a Java Object which can have other objects as member to an XML String. Small example code will be greatly appreciated

Regards
-C
ASKER CERTIFIED SOLUTION
Avatar of ramiseesniblic
ramiseesniblic
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I suggest you read the some documentation about reflection.

http://java.sun.com/docs/books/tutorial/reflect/index.html


Loads of good stuff in there.
Avatar of Ajay-Singh
Ajay-Singh

Or, you could use Xstream.....

Doesn't it go to show the first answer is not always the best answer.

:-)