开发者

How to read an array from XML-RPC

开发者 https://www.devze.com 2023-01-28 06:38 出处:网络
xmlrpc_c::clientSimple myClient; xmlrpc_c::value Result ... myClient.call(serverUrl, \"getattr\", \"s\", &result开发者_StackOverflow社区, pName);
xmlrpc_c::clientSimple myClient;
xmlrpc_c::value Result

...

myClient.call(serverUrl, "getattr", "s", &result开发者_StackOverflow社区, pName);

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


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]);

}

...
0

精彩评论

暂无评论...
验证码 换一张
取 消