As above.
I use stringbuilder.append().
Very straightforward, and you can then do xmldocument.load(strinbuilder object as parameter).
You will probably find yourself using string.concat within the append parameter, but this is a very straightforward approach.