Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello friends,

I am trying to read and write xml through msxml in vc++ 2005. I make the changes and add properties by searching this on internet

I add below two lines in stdafx.h :
C++
#import "MSXML.dll" 
#include <msxml.h>

I add msxml.dll, msxml.h and msxml.lib in project folder. And after compiling I got below error 1024 times:

"error C2059: syntax error : ',' C:\Program Files\Microsoft Visual Studio 8\VC\include\comip.h"

Please help me for this. I am using XP-SP3, VS2005. Also suggest me some links by which I am adding the feature of read-write xml in my project
Posted
Comments
Vaibhav_J_Jaiswal 11-Jun-13 3:47am    
I go through this article. But the above thing is happen here also.
Richard MacCutchan 11-Jun-13 3:51am    
You need to go back to the actual line in comip.h where the error occurs, to see what definition is missing. It's quite possible that your #import statement is placed too early, and requires one or more other #include files before it.

you should remove the statement:

C++
#include <msxml.h>

consider looking after an other XML-framework than MS.
 
Share this answer
 
v2
Comments
JackDingler 11-Jun-13 9:37am    
I agree. If it's a requirement, then you're stuck with it...

Otherwise, there are other open source solutions that fit the bill.

pugixml has done the job for me.

http://pugixml.org/
H.Brydon 16-Jun-13 22:30pm    
Yeah I'd like to add a "me too" endorsement for just about anything besides msxml. Microsoft made a mess out of it when "updating" from msxml2 to msxml3, and they are now on msxml6(?), still with an ugly mess.

In a previous lifetime, I had an MFC app, which I upgraded to /CLR just so I could access System::XML, which is a much nicer interface.
KarstenK 17-Jun-13 2:04am    
Microsoft is a compnay in which only "new features" are achievement. Optimizitation, stabilitiy and usebility are "nice to have" but they dont get scored by the MS-managments.

The XMl-stuff from them is really poor, i used tinyXML with more fun and have now the privilege to parse XML on iOS.
Use CXMLFile - A Simple C++ XML Parser[^] to read any of the xml file
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900