资 源 简 介
iOS开发时 对XML数据进行解析//初始化用来临时存储从xml中读取到的字符串 self.workingPropertyString = [NSMutableString string]; //初始化用来存储解析后的xml文件 self.workingArray = [NSMutableArray array]; //从资源文件中获取images.xml文件 NSString *strPathXml = [[NSBundle mainBundle] pathForResource:@"images" ofType:@"xml"]; //将xml文件转换成data类型 self.xmlData = [[NSData alloc] initWithContentsOfFile:strPathXml]; //初始化待解析的xml self.parserXML = [[NSXMLParser alloc] initWithData:xmlData]; //初始化需要从xml中解析的元素 self.elementsToParse = [NSArray arrayWithObjects:kIDStr, kNameStr, kImageStr, kArtistStr, nil]; &n