Hi, is this still an issue? I think that for SaaS, then this explains the situation:
Quote:
For cloud solutions .NET interop is not available due to safety issues in running arbitrary .NET code on cloud servers. With the AL Language extension, you can find AL types that replace the most typical usages of .NET like HTTP, JSON, XML,
https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-dev-faq
I tried to make some very basic XML structure below, I know it's not pretty, but I hope it gives you some ideas to get started:
XmlDocument.ReadFrom('<?xml version="1.0"?><XmlDocument><MyNode>Node 1</MyNode></XmlDocument>', VarXMLDoc);
TempBlob.CreateOutStream(OStr);
VarXMLDoc.WriteTo(OStr);
Tempblob.CreateInStream(IStr);
FileName := 'Myxml.xml';
OK := DownloadFromStream(IStr, '', 'c:\Temp', '', FileName);
var
ReadFile: Codeunit ReadFile;
VarXMLDoc: XmlDocument;
OStr: OutStream;
IStr: InStream;
FileName: Text;
TempBlob: Codeunit "Temp Blob";
OK: Boolean;