I am developing a survey android app so that:
- Each survey is downloaded from server as XML file.
- A survey can have multiple versions (new survey, new XML).
- When a new XML is downloaded it should overwrite its corresponding
previous XML.
I would like to store the files in a sqlite database. How can I insert my files into the db?
Should I use BLOB or store the content of the XML as string? In any case how should I do it?
Store the whole xml string as a standard string in the database. Then you can retrieve it and parse it easily.
For tutorials on using sqlite in android refer:
http://developer.android.com/guide/topics/data/data-storage.html#db
http://www.vogella.com/articles/AndroidSQLite/article.html
http://www.androidhive.info/2011/11/android-sqlite-database-tutorial/
http://android-er.blogspot.in/2011/06/simple-example-using-androids-sqlite_02.html