Hello everybody,
here I am with a very strange issue processing an XML file.
I have a WD app which has a process reading XML files to extract some data related to products. So this process was working fine by using this code:
nSUP_GLN = XMLRead("MyXML","/catalogueItemNotificationMessage/transaction/documentCommand/catalogueItemNotification/catalogueItem/tradeItem/informationProviderOfTradeItem/gln")
Now the provider of the XML files has changed the strucure of the XML files and now this line is currently returning zero instead of the value in the attibute. So after investigating and struggling to get it working again I had to change my code for this one:
xNode = xmlFile.catalogueItemNotificationMessage.transaction.documentCommand.catalogueItemNotification.catalogueItem.tradeItem.informationProviderOfTradeItem.gln
nSUP_GLN = xNode..Text
and the right value is returned of course. But that means I need to change all the code in my program.
Can someone explain why? the path is actually the same in both coding formats but the first one says the path is wrong and returns zero and the second one is working fine.
Really do not understand the difference.
Any help or comment is welcome.
Thanks in advance.
Regards,
Victoria
here I am with a very strange issue processing an XML file.
I have a WD app which has a process reading XML files to extract some data related to products. So this process was working fine by using this code:
nSUP_GLN = XMLRead("MyXML","/catalogueItemNotificationMessage/transaction/documentCommand/catalogueItemNotification/catalogueItem/tradeItem/informationProviderOfTradeItem/gln")
Now the provider of the XML files has changed the strucure of the XML files and now this line is currently returning zero instead of the value in the attibute. So after investigating and struggling to get it working again I had to change my code for this one:
xNode = xmlFile.catalogueItemNotificationMessage.transaction.documentCommand.catalogueItemNotification.catalogueItem.tradeItem.informationProviderOfTradeItem.gln
nSUP_GLN = xNode..Text
and the right value is returned of course. But that means I need to change all the code in my program.
Can someone explain why? the path is actually the same in both coding formats but the first one says the path is wrong and returns zero and the second one is working fine.
Really do not understand the difference.
Any help or comment is welcome.
Thanks in advance.
Regards,
Victoria