Nickk321
Nickk321

Reputation: 75

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.

Upvotes: 5

Views: 5904

Answers (1)

Sunny Kumar Aditya
Sunny Kumar Aditya

Reputation: 2846

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

Upvotes: 10

Related Questions