I have a desire for a functionality in my app that lists plug sizes for different countries, and I found a nice wikipedia page that has this data:
If you scroll down you can see that the data is presented into a table. Since there is no Wikipedia API, I have to insert the data into a PLIST right? Is there another way to do this? How can I parse these tables into a dictionary or an array?
I have written a Wikipedia API Wrapper for Objective-C there you can get the html source of this wikipedia entry. With a DOM Parser you can find the table and loop over the entries and write it into a dictionary.
Unfortunately the table you need doesn’t have an id. But you could search for one of the header words in the table step out one element and get the table.
https://github.com/prine/WikiApiObjectiveC
I just checked. These are the only four lines you need to fetch the html source of your desired article.