简体   繁体   中英

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM