Options

Create XML from NAV 2009 R2 RTC

ReedbergReedberg Member Posts: 68
edited 2015-06-16 in NAV Three Tier
Hello experts,
I am working with NAV 2009 R2. I have the following sample of code:
  IF ISCLEAR(DataXML) THEN
    CREATE(DataXML,TRUE,TRUE);
  
  XMLDocInstr := DataXML.createProcessingInstruction('xml','version="1.0" encoding="UTF-16"');
  DataXML.insertBefore(XMLDocInstr, DataXML.childNodes.item(0));

Where
DataXML	        Automation	'Microsoft XML, v6.0'.DOMDocument60	
XMLDocInstr	Automation	'Microsoft XML, v6.0'.IXMLDOMProcessingInstruction	

It works fine under classic client. However when run from RTC the following error message appears:
This message is for C/AL programmers: The call to member insertBefore failed: The parameter is incorrect. .

Could you please advise me what is wrong with code or RTC? What can I do in order to run this code under RTC?
Any help will be really appreciated, because I am stuck with this.
Sign In or Register to comment.