473,781 Members | 2,732 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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::XmlRpcV alue xmlVal = some_xmlrpc_met hod(...);
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

Jul 20 '05 #1
0 1183

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1470
by: Ian Rastall | last post by:
Ah, I hope it's okay to keep posting questions, and sorry for the vague subject line. This is my problem: I've got a database set up with 7 fields: ID, Album, Year, Type, Songs, Members, Production. I've built a dynamic table that list Album, Year and Type, and when you click on Album, the other info is supposed to appear to the left. Well, it does, for the first entry, but not for subsequent entries. Here's the code from the top of the...
2
2023
by: mtp1032 | last post by:
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;
17
1857
by: James S. Singleton | last post by:
Let S be a pointer to a bytestring of length L. I would like to extract 4 bytes from S at the location p = S + d, with 0 < d < L - 4, and store them into an unsigned int. I am looking for suggestions on how to do this 1) In portable ANSI C. 2) As efficiently as possible. 3) Taking full account of the potential data alignment and endianness issues that this action must tackle.
4
1467
by: Curious | last post by:
Hi, I have a class with properties and each property has specific datatypes. Is it possible to extract the datatypes of each property found in a class? I would like to extract these datatypes so that I can build a dataset schema structure at runtime.
11
3845
by: Kevin Prichard | last post by:
Hi all, I've recently been following the object-oriented techiques discussed here and have been testing them for use in a web application. There is problem that I'd like to discuss with you experts. I would like to produce Javascript classes that can be "subclassed" with certain behaviors defined at subclass time. There are plenty of ways to do this through prototyping and other techniques, but these behaviors need to be static and...
14
3768
by: Adnan Siddiqi | last post by:
Hi Suppose I have following URLs comming from an HTML document <a href="http://mydomain1.com">Domain1</a> <a href="http://subdomain.domain.com/myfile.anyext">http://subdomain.domain.com/myfile.anyext</a> <a href="http://subdomain.domain2.com/myfile.anyext">Domain2</a>
4
1846
by: Rex | last post by:
I want to find out as much as I can using JavaScript about the user's browser and possible about the user himself or herself. is there a good guide anywhere on the Internet that explains what information can be extracted using JavaScript? on various web pages I see short mentions of variables such as document.referrer and browser.name as I have yet to find a comprehensive listing of these variables. Can someone please point me to a...
4
3941
by: dexter48 | last post by:
Hi I'm searching for a string occurance in a text file. I find the string ok and write the results to a log file. But on the line above is also some information I need. How can i get that. The string occurs a number of times, but not an exact match for the string above. Can you help please: see code #!C:\\Perl\\bin use File::Copy; use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); ...
2
1996
by: avik1612 | last post by:
hi, I have created a script in perl to extract n number of zip files to a particular destination after creating the folder of the zip file. It is extracting . But when the zip file has subdirectories or folders inside it it ignores that and eztracts the whole contents without making folders what shout it do I am using activeperl in Windows XP i have pasted the code
0
9639
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10308
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10143
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10076
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9939
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8964
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2870
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.