Hi Josh,
Thank you for posting query in Microsoft Q&A Platform.
Please note, in your value \ are escape characters to escape double quotes("). When you see any data in output json of activity if there is any double quote then it use \ as escape character to represent it. But in reality that \ is not part of your value.
Regarding your expressions `@xml(replace(variables('test'),'', '' )).
Here you are trying to replace empty with empty, that means nothing will change and also you are using returned value as input to xml()
function. XML function input should not XML string. It should different kind of string which can then convert to XML.
For example, in below example I am using json string as input to XML() function. Hence its finally able to generate XML from it.
xml(json('{ "name": "Sophia Owen" }'))
output: <name>Sophia Owen</name>
Hope this helps. Please let me know if any further queries.
Please consider hitting Accept Answer
button. Accepted answers help community as well.