| Author |
Can I serialize into an XML format?
|
Kaydell Leavitt
Ranch Hand
Joined: Nov 18, 2006
Posts: 679
|
|
I did the following as an exercise to learn how to do serialization. It works, but I believe that it reads and writes an object in a binary format. My question is how can I serialize my Cat object into XML format? [ September 10, 2008: Message edited by: Kaydell Leavitt ]
|
 |
Freddy Wong
Ranch Hand
Joined: Sep 11, 2006
Posts: 959
|
|
You can use java.beans.XMLEncoder for that, e.g. Alternatively, you can use XStream. http://xstream.codehaus.org/
|
SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
|
 |
Jibitesh Prasad
Greenhorn
Joined: Feb 20, 2007
Posts: 20
|
|
|
Or you can try Apache's Xerces.
|
 |
 |
|
|
subject: Can I serialize into an XML format?
|
|
|