tags:

views:

71

answers:

2

I'm developing an app using UITableView driven content.

Current testing is done with local XML of size 100kb. This info should update about once every 2 months. The flow is reading pre-sorted XML -> convert to NSDictionary -> UITableView

Since parsing XML will take some work during load every time, plus table index, sorting and searching seems clumsy. So I have this idea about storing such info in a sqlite DB file

My real question is whether it's possible to download the entire sqlite DB file via http(s) instead of XML to update the info?

+1  A: 

I don't understand the question...you have a sqlite database on a server somewhere and you want to know if it's possible to download via http? Yes, of course, just open a NSURLConnection and grab the data.

If you want to somehow transform XML from an http source to a sqlite database, well, then you'll have to write your own custom transformation code to get the proper SQL statements--there's no automatic way to do this in Cocoa.

drewh
Yes, that's what I'm asking. Whether to download XML file or sqlite db file directly from server.coz I'm trying to avoid xml transformation to keep the iphone free. thanks.
Mitch
A: 

You have a couple of options...

  • You can keep the stuff on the server XML and build the database on the fly.
  • You could post a text file on the server with pre-canned insert statements.
  • You could just have a ready made DB file on the server and download it.

Any would work... Some are more code than others.

Lounges
Think I'll just use a db file instead. coz I wanna keep any processing as less as possible.Cheeers.
Mitch