473,616 Members | 2,970 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reading XML stream using unmanaged c++

Hello All,

My code below sending request to web server and getting response as XML
string.
char* response;
wf.getResponse( response,500);

where outout of above function returns xml string which is stored in
response variable.

response ="<login>
<session_id>50e 39f252f247cc8e4 ebb40416f16c38</session_id>
<logged_in>TRUE </logged_in>
<voice_enabled> TRUE</voice_enabled>
<ads_disabled>T RUE</ads_disabled>
<user_id>9755 8</user_id>
-
- <buddy_list>
<user_id>9700 2</user_id>
<username>unico rn11</username>
<logged_in>FALS E</logged_in>
<game_id>0</game_id>
<user_id>9756 2</user_id>
<username>yashw ant</username>
<logged_in>FALS E</logged_in>
<game_id>0</game_id>
</buddy_list>
<auto_join_chan nel />
<button_confi g />
</login>";

I need to parse this string so that i can check output where user is logged
in whats game ID and all these parameter i required to manuoulate
my task.

where i implemeneted this in c# using XmlTextReader which is so simple but i
need it in unmanaged c++ application..
so please help me regarding this....
wating for reply.
Mayur


Nov 16 '06 #1
1 2762
Mayur wrote:
where i implemeneted this in c# using XmlTextReader which is so simple but i
need it in unmanaged c++ application..
With C++ you can/should use MSXML for XML parsing, see the MSXML SDK, it
is online here:
<http://msdn.microsoft. com/library/default.asp?url =/library/en-us/xmlsdk/html/b24aafc2-bf1b-4702-bf1c-b7ae3597eb0c.as p?frame=true>
If you have questions on using MSMXL then microsoft.publi c.xml is the
right place.
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Nov 16 '06 #2

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

Similar topics

4
1921
by: bidou | last post by:
Hello World, Using (unmanaged) C++ only, I'd like to be able to read a binary stream coming from a .net object standard serialization. For example, let's assume I have a .net client which serializes some "POD" objects using the standard .net serialization mechanism, then writes them to a network stream, and finally a C++ server receives this stream, reads it and "interprets/deserializes" it, creating the corresponding C++ objects.
24
2742
by: Hendrik Schober | last post by:
Hi, I have a 'std::istream' and need to read its whole contents into a string. How can I do this? TIA; Schobi
21
13069
by: JoKur | last post by:
Hello, First let me tell you that I'm very new to C# and learning as I go. I'm trying to write a client application to communicate with a server (that I didn't write). Each message from the server is on one line (\r\n at end) and is formed as - each of which is seperated by a space. Arguments with spaces in them are enclosed in quotations. So, I'm able to open a connection to the server. When I send a message to
8
15584
by: TJ | last post by:
I need to be able to pass a pointer to a (managed code) Stream object to a COM method so it can serialize its data into the stream. I have a C# application that makes uses of Randolf Duke's MimeSniffer COM component (http://www.codeproject.com/internet/mimesniffer.asp). My application (pop3ImageGrabber) uses MimeSniffer to identify each image attachment in emails that have been collected from a POP3 mailbox. MimeSniffer gives the...
3
2457
by: Usenet User | last post by:
I am trying to read (and then save) a binary file which has certain data structures in it. (The file is in propritetary format produced by a 3rd party MFC application.) I know that those data structures would correspond to the structures similar to the one below: private struct MyStruct {
5
9562
by: Dave A | last post by:
I have an application that does lots of socket communications all asynchronously via the TcpClient class. The code has been working 99.9999% of the time (yeah one of those bugs) but occasionally the receiving thread would get 'stuck'. The pattern that I have used from the reading is quite common... AutoResetEvent waitForReadToComplete; NetworkStream stream; .... code to start the socket, send some data and then read the data by...
2
7529
by: Joe | last post by:
Anyone can suggest the best method of reading XML and adding data to ListView? Here is the xml data structure:: <xml> <site> <url>http://www.yahoo.com</url> <lastupdate></lastupdate> <check>1</check>
4
2028
by: Helge Jensen | last post by:
In C# 2.0 System.IO.Stream is declared as: public class Stream: ..., IDisposable { ... public void Dispose(); public void Dispose(bool); IDisposable.Dispose(); } Which must be a design-blunder, if not a 100-year sleep. It prevents
0
246
by: Mayur | last post by:
Hello All, My code below sending request to web server and getting response as XML string. char* response; wf.getResponse(response,500); where outout of above function returns xml string which is stored in response variable.
0
8203
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
8146
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8647
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...
1
8297
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
8449
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
7121
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
4141
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1445
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.