How to parse different files depending on the current date in Xcode?

ForgottenMemory

New Member
I have the following problem: I am building an app that is a TV Guide. I am parsing the listing for the channels from a xml file on the internet. This is my code:\[code\]-(void)loadListing{ NSURL *urlListing = [NSURL URLWithString:@"http://pik.bg/TV/bnt1/29.03.2013.xml"]; NSData *webDataListing = [NSData dataWithContentsOfURL:urlListing]; NSString *xPathQueryListing = @"//elem/title"; TFHpple *parserListing = [TFHpple hppleWithXMLData:webDataListing]; NSArray *arrayListing = [parserListing searchWithXPathQuery:xPathQueryListing]; NSMutableArray *newArrayListing = [[NSMutableArray alloc] initWithCapacity:0]; for (TFHppleElement *element in arrayListing) { Listing *shows = [[Listing alloc] init]; [newArrayListing addObject:shows]; shows.broadcast = [[element firstChild] content]; } _shows = newArrayListing; [self.tableView reloadData];}\[/code\]Look at the first row - my file's name is /.../01.04.2013.xmlTomorrow's file will be /.../02.04.2013.xml and etc.How to make it parse different files depending on the current date? Like this: today parses /.../01.04.2013, tomorrow will parse /.../02.04.2013 and etc. ? Thanks in advance!
 
Back
Top