I have an android application that reads an XML file and presents some information to the user. The data structure is a simple ArrayList. The user goes through the list and they may make changes or they may not make changes just depending. When they are done they save.
Eventually we want that data on the RDBMS but they may not have a data connection at that exact moment so I need to persist it. Even if they do have a data connection I would probably feel comfortable knowing I have the data structure serialized to the sd card.
So step one is do I persist it in a binary state (it is a very small data object) or serialize it out to XML which is what I was thinking at first. That way it can be uploaded to a web service in it’s xml form.
If I serialize it out to XML are there any libraries / example I can read up on. I use SAX to parse it but was thinking there must be something like a simple overload to dump it out????
pseudo code:
ArrayList<MyOb>;
MyObj.Serialize("doc.xml");
If I persist it in it’s binary state what are the steps I need to consider when the user does have a data connection and it is time ti upload.
TIA
JB
I’m going with persisting the data as xml on the sdcard. It’s the best method from what I can discern.