Skip to main content

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.




Comments

  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

Post a Comment

Popular posts from this blog

Wildcards in a hosts file

I want to setup my local development machine so that any requests for *.local are redirected to localhost . The idea is that as I develop multiple sites, I can just add vhosts to Apache called site1.local , site2.local etc, and have them all resolve to localhost , while Apache serves a different site accordingly.