encodes strings as XML without additional function

I realized there was no need for a reusable function