Error after clearing down

Hi

I am trying to write documents in a loop, saving them out at the end of each loop. I want to clear down the document on each iteration so as to begin from scratch again on the next loop. I have tried using the ‘RemoveAll()’ followed by the ‘EnsureMinimum()’ functions but I keep getting the following error:

The reference node is not a child of this node

Hope you can help me.

Hi

Thanks for your request. Could you please create sample code that will allow me to reproduce the problem on my side? I will investigate the issue and provide you more information.
Best regards.