How to use the XML Response from Server?

lahomeloan

New Member
I am programming an App which makes an online search on a private server and (hopefully) shows the results to the users. I want to use a table view to show the results.What I can is: send data, receive a response and parse the XML and save the results in an array.The Problem is : I can not access the array, which stores the response Data, out of the method : - (void)connectionDidFinishLoading:(NSURLConnection *)connection. But i am able to access the same array, within this method. I am a total newbie and i got confused. I created an instance variable and initialised with the searchResults array in the method : connectionDidFinishLoading , but when i try to access this array out of the Method:connectionDidFinishLoading, i am always getting the error: Terminating app due to uncaught exception 'NSRangeException', reason: '* -[__NSArrayM objectAtIndex:]: index 2 beyond bounds for empty arrayI just cannot understand why this instance variable is only local initialised.So the Question is: how can i access the data which i get from the server out of the Method: "connectionDidFinishLoading" ?Any help is very very much appreciated,Thanks in advanceCheers FetiP.s. this is my first question ever, excuse me if anything is wrong with my question...
 
Back
Top