I would use a database for this. Even if it's trivial.

I can't quite figure out the meaning of your XML, or I'd describe the schema 
for you, but it will be pretty simple. (In particular, the position of the 
Answer element seems strange to me, and the value doesn't seem related to 
the question?)

If you need to communicate the results off the device, then I'd generate the 
XML at that point. Otherwise, I'd keep it in database form.   

Then you can insert as many trials as you want, and track the individual 
answers as well, query whether he's gotten a particular answer wrong before, 
and a whole lot of other things, and never have to worry about corrupting 
your data with an incomplete write, or coordinating between new and old 
versions of files in a way that doesn't break if you turn off the device in 
the middle of an operation.

XML is great for communicating between programs, or recording final results. 
As you are finding out, it's not so great for storing intermediate data.


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to