views:

30

answers:

1

I was fetching xml through some rss feed. I am unable to sort items in depth like i have sorted easily "channel -> description" as

NSString *resultValue=[[responseDictionary valueForKeyPath:@"rss.channel.description"] textContent];

Above Result: YouTube RSS Feed

My question is how i can parse .... item -> description... i.e (Music video by Andrews \U00a9 1982 MJJ Productions Inc.) i am getting nil if i fetch like valueForKeyPath:@"rss.channel.item.description"]

Key: rss Value: {
    "_text" = "\n";
    channel =     {
        "_text" = "\n";
        description =         {
            "_text" = "YouTube RSS Feed";
        };
        item =         (
                        {
                "_text" = "\n\t";
                description =                 {
                    "_text" = "Music video by Andrews \U00a9 1982 MJJ Productions Inc.";
                };
                enclosure =                 {
                    length = 294;
                    type = "application/x-shockwave-flash";
                    url = "http://youtube.com/v/Zi_XLOBDo_Y.swf";
                };
                link =                 {
                    "_text" = "http://youtube.com/?v=Zi_XLOBDo_Y";
                };
A: 

On the assumption that the text you posted is the output from NSLog, the item key in channel points to an array. item is the whole array and any keys applied to item apply to the array itself, not any of the objects in it. I'm guessing that the runtime is choking on that.

JeremyP