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
Post a Comment