如何使用Objective c中的属性从xml动态传递URL,然后我想将url存储在匹配字符串中。
NSString * home= @"http://sports.xyz.rss/rss.aspx";
MSXMLParser * homenew=[[MSXMLParser alloc]init];
[homenew parseWithURLString:home FileName:@"file" xmlType:@"MATCHES"];
NSMutableDictionary * mainDict = [MSDataDictionary newsDictionary];
for (int i=0; i<=[mainDict count]; i++)
{
NSString * theKey = [NSString stringWithFormat:@"%d",i];
NSMutableDictionary * itemDict = [mainDict objectForKey:theKey];
matches = [itemDict objectForKey:@"title"];
if ([matches isEqualToString:@"cric"])
{
matches=[itemDict objectForKey:@"link"];
break;
}
}
NSString * home=matches;