像这样的响应数组
NewDataSet = {
Table = (
{
City = {
text = "\nThiruvananthapuram";
};
Country = {
text = "\n\nIndia";
};
text = "\n";
},
{
City = {
text = "\nVellore";
};
Country = {
text = "\n\nIndia";
};
text = "\n";
}
);
text = "\n";
我已经写了这段代码..
xmlDictionary = [XMLReader dictionaryForXMLString:xmlResultString error:nil];
NSLog(@"%@",xmlDictionary);
NSLog(@"%@",xmlDictionary);
NSArray * responseArr = xmlDictionary[@"NewDataSet"];
NSLog(@"%@",responseArr);
for(NSDictionary * dic in responseArr)
{
NSLog(@"%@",dic);
//[array1 addObject:[dic valueForKey:@"City"]];
[array1 addObject:[[dic valueForKey:@"City"] valueForKey:@"text"]];
}
但没有得到数据。在数组 1 中。请提前帮我解决这个问题。
问题是我不会得到 NSDictionary 中的值。
错误日志是
此类不符合关键城市的关键值编码。