micheal332001
New Member
I have the following problem: I want to parse multiple elements from xml file, but don't know how to do that. That's my code:\[code\]NSString *dayToString = [NSString stringWithFormat"http://pik.bg/TV/%@/%@.xml", [channelsArray objectAtIndex:indexPath.row], str];NSURL *url = [NSURL URLWithString:dayToString];NSData *webData = http://stackoverflow.com/questions/15744477/[NSData dataWithContentsOfURL:url];// every element with tag <chas>NSString *xPathQueryBegin = @"//elem/chas";TFHpple *parser = [TFHpple hppleWithXMLData:webData];NSArray *arrayBegin = [parser searchWithXPathQuery:xPathQueryBegin];NSLog (@"%@", arrayBegin);// every element with tag <endd>NSString *xPathQueryEnd = @"//elem/endd/";NSArray *arrayEnd = [parser searchWithXPathQuery:xPathQueryEnd];// every element with tag <title>NSString *xPathQueryTitle = @"//elem/title/";NSArray *arrayTitle = [parser searchWithXPathQuery:xPathQueryTitle]; \[/code\]Where's the problem? If I edit the code and delete the rows after the NSLog there is no problem with the code and it works fine. It seems that the problem is after the NSLog, but can't find out why..Any ideas? Thanks in advance!