Ok, I saw TouchXML, parseXML, NSXMLDocument, NSXMLParser, but I'm really confused about what to do.
I have an iphone application that connects to servers, requests data and receives an XML response. A sample xml response for different requests is set at http://pastebin.com/f681c4b04
I have other classes that act like Controller (like in MVC to execute data fetch logic). This class receives input from View classes and processes it, for example. send a request to the web server, receive xml, parse the xml, fill in its variables (its singleton / common classes), and then the answers as true or false for the caller. Caller, based on the response given by the controller class, checks the controller variables and displays the corresponding content to the user.
I have the following controller class variables:
@interface backendController : NSObject { NSMutableDictionary *searchResults, *plantInfoResults, *bookmarkList, *userLoginResult; }
and functions like getBookmarkList, getPlantInfo. Right now I am printing a normal XML return by the NSLog web server (@ "Result ::% @" [NSString stringWithContentsOfURL: url])
I want the generic function that receives the XML returned from the server to process it, make it an NSMutableDictionary containing the textual representation of the XML opening tags as Keys values ββand the XML Tag as values ββand returning this.
Just one question, how to do this?
source share