Anatoli
Anatoli

Reputation: 932

How to read an array from XML-RPC

xmlrpc_c::clientSimple myClient;
xmlrpc_c::value Result

...

myClient.call(serverUrl, "getattr", "s", &result, pName);

If the result is an array, how do I read it?

Upvotes: 0

Views: 1491

Answers (1)

Anatoli
Anatoli

Reputation: 932

found it....

typdef std::vector<xmlrpc_c::value> carray;

...

function(...){

  carray c = xmlrpc_c::value_array(result).cvalue();
  cout << xmlrpc_c::value_int(c[0]);

}

...

Upvotes: 1

Related Questions