04-10-2008 03:11 AM
04-10-2008 12:03 PM
04-14-2008 04:03 AM
04-14-2008 09:17 AM
04-16-2008 12:06 PM
06-09-2009 08:43 AM
Dear Mohan,
I've compared your CVI code to the MSDN code at: http://msdn2.microsoft.com/en-us/library/ms763722(VS.85).aspx.
I've been able to match al your CVI code to the MSDN one with the exception of th MSDN code snippet for the function named "void ValidateDocumentNodes(IXMLDOMDocument3 *pDom, BSTR xpath)".
I'd like to write down the CVI counterpart of this C++ function but I'm not able to understand which are the CVI counterparts of the following C++ lines:
HRCALL(pDom->selectNodes(xpath,&pNodelist),"");
HRCALL(pNodelist->get_length(&length), "");
...
HRCALL(pNodelist->get_item(i, &pNode), "");
HRCALL(pDom->validateNode(pNode, &pError),"");
...
HRCALL(pNode->get_nodeName(&bstr), "");
Could you kindly help me?
Thank you in advance.
06-11-2009 09:28 AM
pDom->selectNodes => MSXML_IXMLDOMDocument3selectNodes
pNodelist->get_length => MSXML_IXMLDOMNodeListGetlength
pNodelist->get_item => MSXML_IXMLDOMNodeListGetitem
pDom->validateNode => MSXML_IXMLDOMDocument3validateNode
pNode->get_nodeName => MSXML_IXMLDOMNodeGetnodeName
The way to map is as follows. Consider pDom->selectNodes.
1) Find the type of pDom: IXMLDOMDocument3.
2) In CVI, open Instrument >> Microsoft XML and find the item corresponding to IXMLDOMDocument3. It will have the same name, IXMLDOMDocument3, unless you changed this during the wrapper generation or it was truncated for size reasons.
3) Now, in CVI, find the function under the IXMLDOMDocument3 item corresponding to the selectNodes method. It is, MSXML_IXMLDOMDocument3selectNodes.
4) In general, the naming scheme of the CVI generated function is <Instrument Prefix>_<Interface Name><Method Name>.
If you are not seeing these functions in the MSXML instrument (.fp) you have, then your file was generated with an older version of MSXML. You need to regenerate the ActiveX Controller wrapper for the latest version of MSXML on your system - I used version 5.0. You can do this in CVI using the Tools >> Create ActiveX Controller menu item.
06-15-2009 07:17 AM
Dear Mohan,
Thank you very much indeed for your hint, it do works.
Kind regards,
Paolo