One possible reason it is because the XML automation version 6.0 component isn’t exist in your customer test environment. Navision 4.0 product normally use XML automation version 3.0. I hope this is the case at your end.
Maybe I should add that it worked yesterday, but not today! So I don’t think it’s the version.
And in regards to using CREATE then if I’m adding a CREATE then it fails. But normally you only use CREATE on the “main” automation, not the once that are initiated from the already initiated automation. Like here I’m using XMLDocument to initiate XMLElements and then the XMLNode. And I’m only using CREATE on the XMLDocument.
This is really strange. Now I tried to change the code to use XML version 4.0 instead of version 6.0.
It still works perfectly when I test it locally. On the server it compiles fine (I actually changed the code from 6.0 to 4.0 and compiled on the server). But when I run it then it fails again.
I seems to load the actual XML document fine. But when it comes to working with the XML, then it appears empty!
How can I test that the core XML automation works on Excel as suggested by faludigabor?
I’m just wondering that since it worked last week and no upgrades or any other applications has been applied to the server since, if the Windows XML automation somehow can be corrupted. But I actually thought that changing the version from 6.0 to 4.0 would have told this.
Or can it be a security problem? I’m admin on the server so this also sounds too weird.
Did you test using exactly from the same XML data? If I don’t get it wrong, your code try to get xml node value from certain path. If the data that you are looking is not around, then the return object would be null (not instantiated).