0

I am using this xmlreader. Here is my code

NSDictionary *xmlDict = [XMLReader dictionaryForXMLString:responseString error:&error1];
NSLog(@"XMLData: %@",xmlDict);

I can save and log the data and it looks like this.

response =     {
        Gpn0 =         {
            text = 10000;
        };
        Gsn0 =         {
            text = 4;
        };
        btn0 =         {
            text = up;
        };        
    };
}

But how can I access a single element from this dictionary?

aVC
  • 2,254
  • 2
  • 24
  • 46

1 Answers1

1
NSDictionary *gpn0 = response[@"Gpn0"];
NSNumber *gpn0_text = gpno[@"text"]; // note this is a numeric value

NSDictionary *btn0 = response[@"btn0"];
NSString *btn0_text = gpno[@"text"]; // note this is a string value    

so on and so forth
Ismael
  • 3,927
  • 3
  • 15
  • 23