|
-
November 7th, 2001, 07:36 PM
#1
How to read XML from C++
Hi Code guru,
I know Java that can read XML file. Can C++/VC++ 6.0 read XML file also?
Please show me how or point me the website which I can learn from it.
Thanks for your help,
Have a nice day,
Danh
-
November 8th, 2001, 02:02 AM
#2
Re: How to read XML from C++
#import "msxml.dll" named_guids
using namespacing MSXML;
....
IXMLDOMDocumentPtr pDoc;
pDoc.CreateInstance( CLSID_DOMDocument );
....
pDoc->load( .... )
....
icq: 37175293
oicq: 329170
msn: [email protected]
yahoo: rick1126
-
November 16th, 2001, 10:34 PM
#3
Re: How to read XML from C++
Try this.
MSXML2::IXMLDOMDocument2Ptr spDoc;
spDoc.CreateInstance(__uuidof(MSXML2: OMDocument40));
CComVariant varPath(L"D:\\example.xml");
if(VARIANT_FALSE == spDoc->load(varPath))
{
ATLTRACE(_T("Load Document Failed!\n"));
}
qingqi song
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|