I want to insert an xml file of approx 270 KB in sqllite database. What would be the approach? Should I be required to parse my xml first before inserting in DB? Even I parse the xml, how can I insert it in the DB?
Asked
Active
Viewed 182 times
1 Answers
1
This is a big and broad question, Rehan, and the answers depend completely on what you are trying to do in your application.
First (if you haven't done it already), you need to create a CoreData model for the sqlite database where you'll be storing your data. Here's a tutorial you can refer to.
Secondly, for the XML file, you need to it into an Objective C object (see the answer described in this question or this one).
And depending on what you want to store in your database, you can go through the list of native objects you've created or you can modify your core data model to simply store those objects completely.

Community
- 1
- 1

Michael Dautermann
- 88,797
- 17
- 166
- 215