How to parsing XML simultaneously from URLS in iphone

Irinanova

New Member
I have about 15 URLs for XML Parsing simultaneously. I am using KMXML Parser for XML parsing.How can i do Parsing simultaneously using thread. How to handle the responses form that parsing. How can i store those responses in Sq-lite Database.My code for parsing is as follow:\[code\] NSArray* yourURLs = [NSArray arrayWithObjects:@"http://www.designworldonline.com/rss/",@"http://www.3dcadtips.com/feed/",@"http://feeds.feedburner.com/MakePartsFast",@"http://www.designworldonline.com/category/technologies/electricalelectronic/feed", nil];for(NSString* url in yourURLs) { [self performSelectorInBackground:@selector(parse:) withObject:url]; }-(void)parse:(NSString*)link {KMXMLParser *parser = [[KMXMLParser alloc] initWithURL:link delegate:self]; _parseResults = [parser posts]; [self performSelectorOnMainThread:@selector(update) withObject:_parseResults waitUntilDone:NO];}-(void)update{ [pd addObject:_parseResults];}\[/code\]But with this coding, \[code\]_parseresults=[parser posts];\[/code\] is called only for last link rather than for each link.and i got response in array \[code\]pd\[/code\] is only from last link & 9 times. i don't know why parsing method is only called last time only.
 
Back
Top