There is nothing wrong with building an XML document with normal String methods, I do it all the time.
Several alternatives exist but directly writing Strings to an output stream is the fastest.
One source of junk characters is Microsoft
word "smart punctuation" - what is writing the data into the database?
When I get bad characters in XML I use a programmer's editor to see the actual hex values in the document.
Bill