tags:

views:

16

answers:

1

I create NSURLConnection to send an request like "http://www.mysiteabc.com/[email protected]&password=123321" and recives an xml like

<response>
TOKEN=abcdef
</response>

in NSData. Anybody can tell me how to read TOKEN from NSData return by NSConection.

A: 

iPhone OS has no (good) native support for XML (since NSXMLParser is way to limited). You should use an opensource XML-parser (based on libxml2) like TouchXML (http://code.google.com/p/touchcode/wiki/TouchXML). There're actually many topics on StackOverflow about parsing xml-data and there're lots of tutorials out there so it probably won't be too hard to implement it in your application.

Tim van Elsloo