M
mtp1032
I need to be able to extract the values from an XmlRpcValue where I do
not know in advance what the keys are, or how many exist. For example,
suppose I have an XmlRpcValue, object, returned by some xml-rpc method,
XmlRpc::XmlRpcValue xmlVal = some_xmlrpc_method(...);
that when printed to std::cout, i.e.,
std::cout << xmlVal << std::endl;
yields the following:
{
eventType: "BIRTH",
mother: "Michelle",
gender: "MALE"
}
Knowing the keys (i.e., 'eventType', 'mother', and 'gender') extracting
the value (i.e., "BIRTH", "Michelle", or "MALE") is straightfoward.
However, suppose I do not know what are the keys? What code could write
to obtain key for each member? In other words, what code do implement
that, when executed, will return the string "eventType", "mother", or
"gender".
Thanks, in advance,
Michael
not know in advance what the keys are, or how many exist. For example,
suppose I have an XmlRpcValue, object, returned by some xml-rpc method,
XmlRpc::XmlRpcValue xmlVal = some_xmlrpc_method(...);
that when printed to std::cout, i.e.,
std::cout << xmlVal << std::endl;
yields the following:
{
eventType: "BIRTH",
mother: "Michelle",
gender: "MALE"
}
Knowing the keys (i.e., 'eventType', 'mother', and 'gender') extracting
the value (i.e., "BIRTH", "Michelle", or "MALE") is straightfoward.
However, suppose I do not know what are the keys? What code could write
to obtain key for each member? In other words, what code do implement
that, when executed, will return the string "eventType", "mother", or
"gender".
Thanks, in advance,
Michael