IXMLNode.GetNodeByName does not return the node

Hi,

We recently upgraded from version 3 to version 9 of the Remoting SDK (I know…large jump :slight_smile:). Anyway, the behavior of IXMLNode.GetNodeByName has changed. It is no longer returning a node like it used to. I’ve been able to track this down to the new version of MSXML that is being used (6.0). Previously it was using 3.0. It has to do with how namespaces are handled now. There is a good explaination of this same problem that exists in C# at https://msdn.microsoft.com/en-us/library/h0hw012b(v=vs.110).aspx#Anchor_2.

Is there anyway to get this working in Delphi with RemObjects? I don’t see a way to give the default namespace a prefix to use when calling GetNodeByName.

Thanks for the help!

you can change

var InstalledMSXMLVersions : TMSXMLVersions;

variable (uROMSXMLImpl.pas) and remove msxml40 and msxml60 values if you want use only msxml30.

by other hand, you can try to use OPENXML, probably it will produce required results.
for this just define RemObjects_OpenXML in properties of your project.

Thanks. I was able to make it work by modifying uROMSXMLImpl.pas as you suggested. However, is there any plan to support this scenario in MSXML 6.0?

you shouldn’t modify uROMSXMLImpl.pas. the easiest way is update it at first line of your project like

uROMSXMLImpl.InstalledMSXMLVersions  := uROMSXMLImpl.InstalledMSXMLVersions - [msxml40, msxml60];

no, we have no plans to change anything