0

I'm new to xcode. I need to know how can we use an xml file as data source in xcode 4.6 for example I've a xml file like this

<Catalog>
    <Title>title1</Title>
    <Description>desc2</Description>
</Catalog>

and I've 2 labels and I need to set their text as title1 and desc2 using the xml file How can I achieve that in xcode 4.6. Please help

Optimus
  • 2,200
  • 8
  • 37
  • 71
  • [What have you tried?](http://whathaveyoutried.com) – Sebastian Mar 14 '13 at 04:41
  • Among many other duplicates. http://stackoverflow.com/questions/1072979/how-do-i-read-and-write-xml-in-cocoa-touch http://stackoverflow.com/questions/2237757/cocoa-objective-c-best-practice-to-parse-xml-document http://stackoverflow.com/questions/3739854/extracting-info-from-xml-into-cocoa http://stackoverflow.com/questions/5274513/cocoa-obj-c-simple-xml-file-reader-need-help http://stackoverflow.com/questions/6010810/read-modify-write-xml-file-in-cocoa – paulmelnikow Mar 14 '13 at 05:16

1 Answers1

1

You can use NSXMLParser to convert the xml data into NSDictionary and use that dictionary data for showing in required labels.

Bhanu Prakash
  • 1,493
  • 8
  • 20