iphone - how to fetch XML code in simple array format in objective c? -


I'm just starting the development of the iPhone and now I am developing a Facebook application. The thing is that I have to get data from the webservice, where the data is in such a format:

  HTTP / 1.1 200 OK content type: text / xml; Charset = utf-8 Content-Length: Length & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Soaps: Body & gt; & Lt; ABC1 & gt; String & lt; / ABC1> & Lt; ABC2 & gt; String & lt; / ABC2 & gt; & Lt; Abc3 & gt; String & lt; / Abc3 & gt; & Lt; / Soap: body & gt; & Lt; / Soap: Envelope & gt;  

Where abc is a variable from which I need to get data. The problem comes here, I do not know how to get data using either JSON or XML.

Can anyone help me ??

Thanks in advance.

You can try to use

  CXMLDocument * theXMLDocument = [[[CXMLDocument alloc] initWithXMLString: yourXMLString Option: 0 Error: & amp; TheError] autorelease]; NSArray * theNodes = NULL; The nodes = [The XML document nodesforxpath: @ "// root" error: & amp; Airer;]; (CXMlelement * Elements in theNodes) {theNodes = [element nodes forexpath: @ "./ abc" error: NULL]; NSLog (@ "% @", the nodes); }  

Comments