As part of my probably wrong and cumbersome solution to print out a form I have taken a MS-Word document, saved as XML and I\'m trying to store that XML as a groovy string s
What exception are you getting? I don't believe Groovy String is limited to 65536, as it is basically a Java string.
Sounds to me like you are trying to recurse somewhere and hitting the 65536 call stack limit.
That being said however, loading a 100K+ char into memory in one go does seem like overkill..
Why not parse the XML using a SAX parser or similar to get the results out?
Or why not save just the data you need to start with rather than relying on hunderds of thousands of chars of xml (which I assume you only want a small section of)