Quote:
Originally Posted by joelschmid91
Hello everyone!
I want to make an application which shows current news and events. Is it possible to connect with a MySQL Database from the Internet and show the contents in an UITableView? I just found Core Data with SQLite but nowhere how to Connect with an Database from the Internet.
What do I have to search for or do you have some links for me how to start?
Thanks in advance for your help!
|
Yes with set of XML parser and a working web service you can easily achieve this.
Here's how you can do this
1. Get an XML or JSON service from the popular websites. You can get plenty of XML or JSOn services from programmable web
ProgrammableWeb - Mashups, APIs, and the Web as Platform
Than you just have to parse the feed, For XMl I use libxml and for JSON I prefer TouchJSON. There are many other alternatives also.
Once you have set the parser. You can just parse the feed and store the values in NSMutableArray or NSArray.
After that you can just use them in application.
The parsing operation will depend upon what exactly you want. Do you want your feed to get updated frequently and stuff.
2. In case you are storing the data on a web server of your own control. Like I said in the previous post. First set up web services that will generate XM: or JSON from the database and will give it as a reply to the request you just made after that you can parse it.
Sorry for grammar and punctuation, I'm in a little hurry