I've been wrestling with this all day and have no idea what i'm doing wrong. I have an NSDictionary
NSDictionary*dict=[tutorialsNodes objectAtIndex:0];
When I NSLog(@"%@",dict);
it returns the following...
{
nodeAttributeArray = (
{
attributeName = class;
nodeContent = style1;
}
);
nodeChildArray = (
{
nodeContent = "Number of Patrons Using Facility: 151";
nodeName = text;
},
{
nodeName = br;
},
{
nodeContent = "
\n Room Occupancy: 210 ";
nodeName = text;
},
{
nodeName = br;
},
{
nodeContent = "
\n Current Wait: 0 minutes ";
nodeName = text;
}
);
nodeName = p;
}
However, when I enter the following code...
NSArray*dictArray=[dict objectForKey:@"nodeChildArray"];
NSLog(@"%@",dictArray);
It returns null
. I am trying to pull the nodeContent from the NodeChildArray
key but I can't even pull the key yet. Not sure why it keeps returning null
REVISION
Here are the exact lines that I am executing...
//some HTML parsing before this
NSArray *tutorialsNodes = [tutorialsParser
searchWithXPathQuery:tutorialsXpathQueryString];
NSDictionary*dict=[tutorialsNodes objectAtIndex:0];
NSArray*dictArray=[dict objectForKey:@"nodeChildArray"];
NSLog(@"%@",dictArray);
It returns null
twice