views:

7922

answers:

6

hi I am new to iphone development. I need to parse simple XML coming from my webserver and store this in database. Is there any sample code for doing the same. Please help me

Thanks

+4  A: 

Please have a look at Touch XML, a Objective-C framework for reading and writing XML. It's usage is similar (drop-in replacement) for Apple's NSXMLDocument (which is not available for the iPhone SDK).

Diederik Hoogenboom
+1  A: 

Apple has two built in solutions for parsing XML data on the iphone:

1) Apple has an objective-c implementation of an XML parser called NSXMLParser. See documentation here.

2) Apple also has a C based implementation of an XML parser called libXML2. See documentation here. - scroll down to see section on XML support

zPesk
+1  A: 

Check out http://www.tbxml.co.uk for a super-fast, lightweight, easy to use XML parser!

Tom Bradley
A: 

The above mentioned Touch XML, seems to be discountinued. KissXML is an alternative. It is based on Touch XML, but has more features.

GDataXML could also be an alternative, its developed by Google.

Olof
A: 

check out this sample: http://pastebin.com/NP9UGPT4

Matrix