DocumentToXMLString throwing outofmemory


I am converting a large IS doc which comprises of many docs and doclists to a string using the pub.xml:documentToXMLString service and subsequently writing it to a file.

This works fine with smaller docs but while processing a large IS doc, it throws an out of memory error.

My developer is set to 256 min and 512 max.

Any inputs is greatly appreciated.


IS services execute on the server, not in Developer. Use large file handling techniques, bump IS memory up by modifying server.bat/ or both.

Hi Mark,

thanks for your inputs.

I am not sure how to use large file handling techniques when parsing an IS doc to xml string. I usually use large file handling tech in TN.

Can you please provide more inputs or point me to any doc which has more information.

Thanks a lot for your help,


Most of the TN and non-TN large doc processing is for inbound documents. Even TN has to have the whole document in memory at one point when sending an outbound document.

The only thing I can think of off the top of my head (with only one cup of coffee in me this morning) is to break the document into sections by running documentToXMLString against individual complex nodes within the document (one at a time), append each resulting string to a file, and create the file in small chunks that way.



Various threads discussed procedures on the IS large file handling capabilities…worth to check this thread or search in this forum with keyword (node iterator)

Get There Faster!!!

As Said above, using the Stream or note iterator you can achieve handling large documents. The xmldoc to string fails , due doc crossed the limit of the string size.