我有這樣的NSDictionary:充分利用NSDictionary的值的NSMutableArray
Categorys = {
Category = (
{
categoryDescription = {
text = " Description";
};
categoryIconPath = {
text = " 7.jpg";
};
categoryId = {
text = " 25";
};
categoryName = {
text = " My Photos";
};
categoryStatus = {
text = " ON";
};
publicPrivate = {
text = " Private";
};
userId = {
text = " 2";
};
},
..................
我想要得到的類別名稱(如我在這裏的照片)到我的NSArray。
我該怎麼做?
我無法把它
我曾嘗試這個代碼http://troybrant.net/blog/2010/09/simple-xml-to-nsdictionary-converter/
NSString *category = [[[[xmlDictionary objectForKey:@"Categorys"] objectForKey:@"Category"] objectForKey:@"categoryName"] stringForKey:@"text"];
得到,但它給錯誤
2012-03-27 15:30:35.320 File[1481:903] -[NSCFArray objectForKey:]: unrecognized selector sent to instance 0x1462c0
**您嘗試過什麼?**發佈您的代碼。 – Devang 2012-03-27 10:22:19
我有點困惑你的結構...是categoryName是關鍵嗎? – 2012-03-27 10:43:05