How to read an array from XML-RPC
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]);
}
...
精彩评论