LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

XML load

I'm trying to use MSXML 4.0 but I'm unable to load an xml file.Here's my code :

hResult = MSXML4_NewDOMDocumentIXMLDOMDocument2 (NULL, 1, LOCALE_NEUTRAL, 0, &ObjXml);

if( FAILED(hResult))
CA_GetAutomationErrorString (hResult, vl_sBuffer, 255);


hResult = MSXML4_IXMLDOMDocument2loadXML (ObjXml, &ErrorInfo,
"D:\\Stock.xml",&vtBool);
if( FAILED(hResult) || vtBool==VFALSE )
{
CA_DisplayErrorInfo (ObjXml, "LoadXML", hResult, &ErrorInfo);
CA_GetAutomationErrorString (hResult, vl_sBuffer, 255);
return FALSE;
}
I always get vtBool == VFALSE.
What is wrong ?
thank you
0 Kudos
Message 1 of 3
(2,904 Views)
Pierre,

I don't have XML 4.0 on my computer, but there is one thing that you may want to look for; make sure that you are openning the ActiveX reference to your local machine. If there is an XML server configured in your machine even if you pass NULL it will open the reference to the remote machine. Try passig your machine name when you create the new ActiveX object; just to make sure that you reference your local machine.

Just my 2 centes.

Juan Carlos
0 Kudos
Message 2 of 3
(2,904 Views)

Hi All, 

 

I am looking for sample code for xml parser in CVI. I was not aware that my current version is 5.5 which xmlcvi.fp not supported. Appreciate if you can show me the complete code to load/read/write xml file as i need it urgently to do my FYP.

 

Thanks

 

0 Kudos
Message 3 of 3
(2,273 Views)