iphone - Parsing Data returned from Twitpic API -


I just wanted to ask you if someone can help me parse the returned data from the Twitter API?

I am creating an HTTPFormRequest using the ASIHTTPRequest wrapper for cocoa. All this happens in an iPhone application:

  NSURL * url = [NSURL URLWithString: @ "http://twitpic.com/api/upload"]; NSString * username = t_user; NSString * password = t_pass; NSDTA * twitpicImage = UIImagePNG Report (imageView.image); // Now, set the post data: ASIFormDataRequest * Request = [[[ASIFormDataRequest alloc] initWithURL: url] autorelease]; [Request setPostValue: twitpicImage forKey: @ "media"]; [Request setPostValue: for user name: @ "user name"]; [Request setPostValue: for password: @ "password"]; [Request SetData: twitpicImage forKey: @ "Media"]; // Start request of webservice [start request]; If ([request error]) {NSLog (@ "% @", [request error]); } And if ([request request string]) {nslog (@ "% @", [request response string]); }}  

Now comes the tricky part, I do not know how to parse the data in [request feedback string] I know I need to use NSXMLParser, but let me Do not know how to use it. I just need to get the URL of the image.

Thx in advance.

feel free to see my small XML parsed sections here

I By uploading images to yfrog.com, it has started using them to parse the response

Actually I do this ... NameValueParser.m I enter the entry Changed the tag to rsp

  entryName = [[NSSTING string whitestrings: @ "RSP"] is maintained);  

Then, where I got the feedback, I parse it like this

name value parser * parser = [name bar parser parser]; [Parser addFieldName: @ "StatSat"]; [Parser addFieldName: @ "UserId"]; [Parser addFieldName: @ "MediaId"]; [Parser addFieldName: @ "mediaeral"]; [Parser addFieldName: @ "fault"]; [Parsing parsdata: reactions]; // ASIHTTPRequest response received by NSArray * rspArray = [parser list]; NSLog (@ "% @", RSPARRA); // See it here

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -