Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jpmcgrath

macrumors newbie
Original poster
Jul 15, 2011
8
0
I have an XML document that has names, addresses, and phone numbers in it. I want to load the names in a table, but then set up contact cards without making more than two interface files. Is there a simple way to do this?

Thanks in advance, I'm new to dev.
 

chown33

Moderator
Staff member
Aug 9, 2009
10,751
8,425
A sea of green
iOS gives you an NSXMLParser class. Read its class reference doc, and look at the sample code linked from there.

If you can't figure it out from that, then you're probably in over your head. You should then stop writing your current app, and go learn the fundamentals first.

You can't hop in the cockpit of an F-18 and fly it with no training or practice. You can't write apps without training or practice, either.
 

seepel

macrumors 6502
Dec 22, 2009
471
1
iOS gives you an NSXMLParser class. Read its class reference doc, and look at the sample code linked from there.

If you can't figure it out from that, then you're probably in over your head. You should then stop writing your current app, and go learn the fundamentals first.

You can't hop in the cockpit of an F-18 and fly it with no training or practice. You can't write apps without training or practice, either.

And if you are not in over your head, NSXMLParser is a SAX type parser, but I believe there are a few DOM style third party parsers out there (quick Google search will surely provide them). So if the tree is not large you could give one of those a try.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.