Hi All,
I'm really struggling here with something that should be simple....
What I am trying to do is to load a stream to the XML DOMDocument automation without saving it to a file and then loading it.......but it doesn't work the load instruction fails without any error but simply not writing anything to the automation...
here's the code
CREATE(XMLDocOut);
TempBlob.Blob.CREATEOUTSTREAM(OutStream);
OutStream.WRITE('<a>test</a>');
IF TempBlob.Blob.HASVALUE THEN BEGIN
TempBlob.Blob.CREATEINSTREAM(StreamInObj);
//This always returns zero, so the loading fails..but WHY????
MESSAGE(FORMAT(XMLDocOut.load(StreamInObj)));
END;
//This File is empty
XMLDocOut.save('c:\stream2.xml')
Please HELP!!!
Thanks ALL
Comments
http://www.mibuso.com/dlinfo.asp?FileID=1123
Am I the only one that had this idea?? ](*,)
http://www.mibuso.com/dlinfo.asp?FileID=1123
Maybe you should also not name Fields and Variables with reserved Words like Blob or OutStream.
Thank you so much Alexander I thought I tried the WRITETEXT but.....It is now working!
This is the code that will work:
Thanks Again and I hope this will help someone else!
http://www.mibuso.com/dlinfo.asp?FileID=1123
Thanks in advance =D>
http://www.mibuso.com/dlinfo.asp?FileID=1123
I need one more favor from you have you ever seen this kind of error -
"Streams cannot be used with client-side invoked automation objects."
Getting this error when ran the code depicted in your post...
Am working on NAV 2013 r2.
Thanks In advance =D>