5

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.

2
  • 1
    [link]developer.android.com/reference/android/content/… It is the best approach towards your requirement. Commented Jul 11, 2012 at 5:51
  • Can you give me what kind of information you have? Do you want to store the entire xml content as a huge string and parse it each time you need to access it from the database? Do you want to store each xml element of your xml file independently? We need to have more information about what you want to store, and how it is right now. You should also give us some code snippets showing what you have done so far. Last, but not least, begin to check the documentation about sqlite databse in android. Commented Jul 11, 2012 at 5:51

1 Answer 1

10

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.