Hi I am build a xml-string in my Webservice
Latest I goot following error-message.
'Memory allocation request exceeded 65,000
bytes’
When I cut down the xml-string I could se it solve the problem.
Is it really true that I cant build a string-variable that exceed 65,000 bytes’
Any suggestion how to solve it
Subject: Are there a limit how big a String-variable can be
I had an issue with LotusScript reading in a file where the user had not included line breaks. I was able to read the contents, but could not use functions like mid.
Subject: Are there a limit how big a String-variable can be
It depends how you create and load the string. If you assign values directly (myString = myString + “a whole bunch more text …”), then there’s a 64K limit. If the string is loaded from a stream or something similar, then you’re dealing with physical memory limitations with, IIRC, a 1 or 2 GB absolute limit – but you give up the ability to manipulate the string, as noted above. In the case of XML, why not create a DOM document and serialize it?
Subject: RE: Are there a limit how big a String-variable can be
Yes I do build my string as you mentioned.As myString = myString + newstring
Could you show mee an example how to do it else do it.
Subject: RE: Are there a limit how big a String-variable can be
Start with a “stub” xml document, then parse that with a NotesDOMParser. Add what you need to add to the document in the PostDOMParse event, then use the Serialise method to feed that to an output string. The Designer Help for NotesDOMParser has everything you need.
Alternatively, you could Priint your statements one at a time instead of building the complete document then printing everything at once.