Tuesday, February 28, 2012

How to parse & print get a element by element from xml in objective C? [closed]


I would like to parse an xml online & get it printed element by element of a single tag in iphone.I don't want it to be tabulated into UITableView,how can I do that.Please help me with an example on this which will be very much helpful.Thanks.


1 comment:

  1. 1. You can use NSXMLParser for this purpose, read through the delegate methods in https://developer.apple.com/library/ios/documentation/cocoa/reference/NSXMLParserDelegate_Protocol/Reference/Reference.html

    2. The delegate methods you would be interested in are :

    - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict
    - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string


    3. This has been asked so many times, please use the search function.

    ReplyDelete