- Vipin Dwivedi
- PowerBuilder
- Tuesday, 31 July 2018 06:40 PM UTC
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
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.