Hi,
i need to export a long string to a xml-file. The string contains about 5000 and more characters. When i use a xml-port i get an error message that the string is to long. I've created an element and try to assign the text to this element with e.g. 5 Textvariables each containing 1024 characters. But i get the above mentioned error. When i try to use automation i will get an error that my stack is not large enough.
Can anyone point me to the right direction?
Regards,
Frank
0
Comments
RIS Plus, LLC
i tried both but without success. First i use an xmlport. I inserted a tag teststring with tagtype text. Then i assign 10 Textvariables to the tag like
teststring := Text1 + Text2 + ... + Text10;
When i run the xmlport i get an error that the string is too long for teststring
then i tried to use 'Microsoft XML, v3.0'.IXMLDOMNode. But when i try the same with XMLDomNode,
XMLNode.Text := Text1 + Text2 + ... + Text10;
i get the same error message.
Can you give me an example how to handle this, please?
Thanks and kind regards,
Frank
RIS Plus, LLC
Carsten
==> How To Ask Questions The Smart Way
This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
You can use xmlports. here is an example.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
It is both possible to read and write elements bigger than 250 char directly with xmldom from C/AL. Now I think of it, I remember making a Base64 encoder and decoder in C/AL and was able to transfer binary files to/from CDATA sections.
Peter
RIS Plus, LLC
What I mean is any function that returns a string that is greater than 250 will error out.
For example XMLNode.text can return a string that is greater than 250 and you'll get the error.
the XMLNode.appenddata doesn't have appenddata.
For example
You cannot read the following xml file with xmldom.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
RIS Plus, LLC
You can read unlimited nodevalues, but not using xmlnode.text. Take a look at the substringData method...
Well, seems time to make an example for he Tips'n Tricks section 8)
Peter
That it. Now it works.
Thanks for all your answers.
Regards,
Frank