Hi,
Our application has been using Msxml2.DomDocument.3.0 in our application and working fine to traversing node in XML.
Recently we upgraded our code and started using Msxml2.DomDocument.6.0 version but this is failing to use SelectNodes for the same XML which is working fine with 3.0. This is failing only if Node is having a colon (:). See below XML content
Below is code
OLEObject aole_object,objNodeList
CONSTANT STRING XPATH_GENERALSTATUS = '//ns2:retrieveAgreementResponse/generalStatus'
aole_object = CREATE OLEObject
li_oleConnectionStatus = aole_object.ConnectToNewObject ('Msxml2.DOMDocument.6.0')
aole_object.async = FALSE
ls_XML = of_get_xml_from_file(as_FileName) //This function returns xml content into String variable.
aole_object.LoadXML (ls_XML)
objNodeList = aole_dom.DocumentElement.SelectNodes(XPATH_GENERALSTATUS); //This is failing in version 6.0 but working fine with version 3.0
Please help and guide me.
Thanks,
Vipin
I don't want to put static value under namespace property. So what is the way to get Namespaceprefix and URL. I can use the code aloe_dom.DocumentElement.NamespaceURI to get the URL of the namespace but what about getting the prefix "xmls:ns2"?
Please help.