I'm having trouble retrieving the node value of 1 XML file. For all other XML files it workes except for this one. I already checked if the XML get loaded and it does. I can find the values in the locals window so it is defenitely reading the XML file. The problem it retrieving the node value for this one.
The code that I used for the other files:
Set oXMLFile = CreateObject("Microsoft.XMLDOM")
XMLFileName = Dir(L_Folder & "\*" & Control & "*.xml")
oXMLFile.Load L_Folder & "\" & XMLFileName
Set NameNode = oXMLFile.SelectNodes("/DataSetCollection/DataSet/Data/Lot/LotRunGenKey")
MsgBox NameNode(i).NodeValue
for the other XML files I added /text()
at the end because there was an extra line with text for every nodevalue.
<?xml version="1.0"?>
<DataSetCollection xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DataSet Name="" Type="" Version="11.2.0" CreateTime="20200220190104">
<Data IsVirtual="false">
<Lot ID="" LotRunGenKey="4bccbfaf-0868-4240-a94f-724d9a79b102" ARPFlag="1" />