nsxmlparser - NSXML parser, where does the program flow go? -


i used nsxml parser parse soap response xml recieved web service. in root method,

 nsurlconnection *theconnection = [[nsurlconnection alloc] initwithrequest:therequest delegate:self];  

i used code send soap request, therequest variable has soap request. after data recieved ,

 -(void)connectiondidfinishloading:(nsurlconnection *)connection{      //codes recieve webdata     xmlparser = [[nsxmlparser alloc] initwithdata: _webdata]; [_xmlparser setdelegate: self]; [_xmlparser setshouldresolveexternalentities: yes]; [_xmlparser parse];   } 

now, program flows didstartelement , didfinishdocument methods. root method needs return result obtained after parsing xml , when checked program flow using breakpoints, parsing methods doesnot end before return statement called in code , hence not able return parsed values. how solve this?

nsxmlparser works synchronous. when [_xmlparser parse] returns, parsing done (or aborted error).


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -