views:

117

answers:

2

Hi all, I am receiving a chunk of data from PBX in string with tags included. Something like this:

</response><rid>2</rid><name>2101<name><PeerList></PeerList><status>UNKNOWN</status>

cont...till it fetches all the names/users from the PBX.

what i need to do is to parse this string data to retrieve name & status and update in to the table where i can add the user into iPhone's phonebook. I've started with NSScanner but eventually i messed up with that. if anyone has any idea please help me out!!!!

A: 

You have received an XML file, use an XML parser first.

What language/OS/environment are you using?

NSScanner seems to be Mac specific.

Ernelli
The tags already said it is in "cocoa-touch" for "iphone".
KennyTM
Manab
A: 

Check out NSXMLParser or a third-party framework such as TouchXML.

gerry3
Manab
Ok, it sounds like you are trying to develop your own parser. I am not sure about the best approach in that case, but NSScanner does look promising. Could you provide more details about the issue(s) you had?
gerry3