read parsed response from XML-RPC cocoa framework

I try to use this library to retrieve information from an xml-rpc server.

The connection is ok and I can see the parsed object display in the console but I don't know how to read the response object even if I tried a lot.

Here is the console result of NSLog(@"%@", [response object]); (response is a XMLRPCResponse) :

stations =     {
        0 =         {
            IdStation = 2;
            Message = "everything ok!";
        1 =         {
            IdStation = 1;
            Message = "everything ok!";

I want to list all stations and get id and message but I can't get it.


Ah, I found the solution.

Here it is :

NSDictionary *allStations = [parsedObject objectForKey:@"stations"];
NSArray *keys = [allStations allKeys];

for (NSString *key in keys)
   NSDictionary *currentStation = [allStations objectForKey:key];
   [station setIdStation:
             [NSNumber numberWithInt:
                        [currentStation objectForKey:@"IdStation"]

Hope it can help a beginner like me !

Joshua, thanks to tried to help me.

Need Your Help

How do I get the input value from a Nokogiri::XML::NodeSet?

ruby nokogiri

I am looking for my input element using Nokogiri's xpath method.