[Q] Extracting the key members of an XmlRpcValue object (C++)

Discussion in 'XML' started by mtp1032, Jan 22, 2005.

  1. mtp1032

    mtp1032 Guest

    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, xmlVal, returned by some xml-rpc method,


    XmlRpc::XmlRpcValue xmlVal = some_xmlrpc_method(...);
    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
    mtp1032, Jan 22, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JFCM
    Replies:
    4
    Views:
    5,734
  2. CoolPint
    Replies:
    8
    Views:
    976
    Jeff Schwab
    Dec 14, 2003
  3. mtp1032
    Replies:
    2
    Views:
    380
    Jack Klein
    Jan 22, 2005
  4. M P
    Replies:
    1
    Views:
    466
  5. Replies:
    2
    Views:
    156
Loading...

Share This Page