I am developing an app where I need to insert data coming from web service into sqlite3 database.Web service returns XML data with 5 tags.Now after XML parsing how to insert parsed data into sql database? Can I code for this??? Thanks in advance..
Asked
Active
Viewed 1,217 times
-1
-
1This is far too broad a question to answer here. I recommend reading some of the resources linked to in this question: [Add SQLite Database to iphone app](http://stackoverflow.com/questions/487339/add-sqlite-database-to-iphone-app) and coming back when you have a specific question about an implementation detail. – Brad Larson Sep 08 '10 at 20:08
1 Answers
2
Inserting XML data in sqlite database is no different that inserting any data. So there are 3 parts of the problem you are trying to solve:
- Calling the web service and getting the data
- Parsing the data and populating some object
- Inserting that data in sqlite database which has columns as per your object structure
NSURLConnection and NSXMLParser are the classed you need to look at for solving first 2 problems. Third one would be solved using sqlite library. Without more information about object structure it is difficult to suggest anything else. But you should find enough documentation on using sqlite if you search around.

Hemant
- 19,486
- 24
- 91
- 127