Click to See Complete Forum and Search --> : Saving an arraylist in xml


Jef Patat
July 29th, 2007, 02:05 PM
Hi all,

I have an arraylist that I wish to save to an xml file. I know I can do this through serialisation but that seems not correct since it is mixing the data storing and the data representation. It might be that later on the data is stored in another way.

How can I store the arraylist to an xml file without using serialisation?

kind regards, Jef

TheCPUWizard
July 29th, 2007, 02:08 PM
Serialization is indeed the proper way to go (if you are storing as XML).

What you do with the XML stream (on a store) or where you get the XML stream (on a load) is what is independant of the data representation.