Options

xml via automation in codeunits without xmlports

davmac1davmac1 Member Posts: 1,283
edited 2015-04-16 in NAV Three Tier
I am upgrading NAV2009 to NAV2013R2.

I am running into a problem with the xml code executed directly in the codeunits.
I get the automation variable not instantiated when it first executes “XMLNode := XMLDom.selectSingleNode”
If I add a create(XMLDom) before it, it compiles, but gets a different error – cannot create an instance of an automation server.
I added a create on the document (CREATE(XMLDocument, TRUE ,TRUE);) ('Microsoft XML, v6.0'.DOMDocument60) which does not get an error. In NAV2013R2 am I meant to tie all this together somehow>
The code is currently using:
'Microsoft XML, v6.0'.IXMLDOMAttribute
'Microsoft XML, v6.0'.IXMLDOMNode

It does look like this automation should still be supported in the new NAV versions based on the online documentation.

Is there a way to get it to work, or would I be better off switching to dotnet?

Problem was different automation names in Windows server - had to make sure all old document definitions were changed correctly to DOMDocument60.

Answers

  • Options
    chiosanchiosan Member Posts: 5
    yes you need to use dotnet.
    You can find one called Mircosoft.MSXML in Dotnet and that should mostly fit with you existing function.
Sign In or Register to comment.