Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to store data from XML file to SQLite database in android

I am developing an application -- When a user is successfully logged in, an XML file is fetched from a URL and the XML data is displayed in list view.

How do I store that data in SQLite database, such that an offline user can see the data stored in the database? I also want to create a refresh button, which displays an updated XML file and stores it in SQLite, when it is clicked.

like image 688
Nickk321 Avatar asked Jul 11 '12 05:07

Nickk321


1 Answers

1)Get that Xml

2)Parse the xml using sax or any other parser you prefer For parsing tutorial

3)Use the parsed data as you need in your case put it into Database For Database tutorial

4)Populate the list view For listview tutorial

like image 166
Sunny Kumar Aditya Avatar answered Oct 27 '22 00:10

Sunny Kumar Aditya