Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios XML到字典的转换_Ios_Objective C_Xml_Json - Fatal编程技术网

Ios XML到字典的转换

Ios XML到字典的转换,ios,objective-c,xml,json,Ios,Objective C,Xml,Json,我也是IOS-Objective c和XML数据解析方面的新手。使用ABBEY scanner,我得到一个XML,使用“XMLReader”(从Github下载)得到字典值,如下所示 xmlDictionary = { items = { item = { id = 0001; type = donut; name = { text = Cake;

我也是IOS-Objective c和XML数据解析方面的新手。使用ABBEY scanner,我得到一个XML,使用“XMLReader”(从Github下载)得到字典值,如下所示

    xmlDictionary = {
    items = {
        item = {
            id = 0001;
            type = donut;
            name = {
                text = Cake;
            };
            ppu = {
                text = 0.55;
            };
            batters = {
                batter = (
                    {
                        id = 1001;
                        text = Regular;
                    },
                    {
                        id = 1002;
                        text = Chocolate;
                    },
                    {
                        id = 1003;
                        text = Blueberry;
                    }
                );
            };
            topping = (
                {
                    id = 5001;
                    text = None;
                },
                {
                    id = 5002;
                    text = Glazed;
                },
                {
                    id = 5005;
                    text = Sugar;
                }
            );
        };
     };
 }

如何解析这种字典,在所有方面都显示null值。请帮助

取这本词典需要什么钥匙?使用NSJSONSerialization解析数据我不理解“显示所有方面的值为null”的问题。@SureshThoutam JSON Serializer for XML?