Using MSXML in VS 6.0 C++ app
-
I have never used MSXML, so bear with me. I have a small C++ app that receives a message via another app. The message received is XML format but is contained in a string and not passed as an XML doc. Stuck with this, nothing I can do about this part. So, I need to implement MSXML, I am hoping this is the right path, to load the string into an XML doc and parse through it. Does anyone have or know of a simple example of how to do this? The xml string I receive only has 2 elements, so this does not have to be a very involved example with lots of bells and whistles. Just looking for the basics. BTW, I am using MSXML 6.0. Thanks a lot in advance for the help. Troy Schenk
-
I have never used MSXML, so bear with me. I have a small C++ app that receives a message via another app. The message received is XML format but is contained in a string and not passed as an XML doc. Stuck with this, nothing I can do about this part. So, I need to implement MSXML, I am hoping this is the right path, to load the string into an XML doc and parse through it. Does anyone have or know of a simple example of how to do this? The xml string I receive only has 2 elements, so this does not have to be a very involved example with lots of bells and whistles. Just looking for the basics. BTW, I am using MSXML 6.0. Thanks a lot in advance for the help. Troy Schenk
MSXML implements an XML DOM and maybe also a SAX parser. You can go study how those things work at web sites like TOP XML and www.w3schools.com I also believe you will find sample code using MSXML at w3schools. Now those samples might be in something like Javascript but that doesn't matter because the COM interfaces are the same when you use them from C++. Of course if you don't have experience using COM interfaces from C++ then you will also need to learn about that.
led mike
-
MSXML implements an XML DOM and maybe also a SAX parser. You can go study how those things work at web sites like TOP XML and www.w3schools.com I also believe you will find sample code using MSXML at w3schools. Now those samples might be in something like Javascript but that doesn't matter because the COM interfaces are the same when you use them from C++. Of course if you don't have experience using COM interfaces from C++ then you will also need to learn about that.
led mike
-
I have never used MSXML, so bear with me. I have a small C++ app that receives a message via another app. The message received is XML format but is contained in a string and not passed as an XML doc. Stuck with this, nothing I can do about this part. So, I need to implement MSXML, I am hoping this is the right path, to load the string into an XML doc and parse through it. Does anyone have or know of a simple example of how to do this? The xml string I receive only has 2 elements, so this does not have to be a very involved example with lots of bells and whistles. Just looking for the basics. BTW, I am using MSXML 6.0. Thanks a lot in advance for the help. Troy Schenk
Hello, here's a list of Code Project usefull articles for you: 1) Sven Wiegand's C++ Wrapper classes for the COM interfaces of Microsoft XML parser[^] 2) nschan's Parsing XML using a C++ wrapper for SAX2[^] 3) Kristen Wegner's PugXML - A Small, Pugnacious XML Parser[^] Best regards, Mihai Moga