How are you coding this? >From the posted items, it's clear that you are passing a string of XML to an API that specifically wants text payload. So it's carefully excaping your less-than signs.
If you tell us what you're calling and where, someone can probably tell you how to insert an XML element into a DOM tree or otherwise get what you want.