0

Passing a valid JSON Message to the @xml() function works but the output seems to be somehow serialized. Is there a reference how to use the @xml() function or does anybody know what i'm doing wrong?

Expression in Data Operations - Compose Function (where 'Add_Root_Element' is the previous Function Block):

"inputs": {
    "xml": "@xml(outputs('Add_Root_Element'))"
}

Generated Output:

{
  "xml": {
    "$content-type": "application/xml;charset=utf-8",
    "$content": "PHJvb3Q+PHBhcnRpY2lwYW50Pjxjb3VudHJ5PkF1c3RyYWxpYTwvY291bnRyeT48ZGVwYXJ0bWVudD5JbmZvcm1hdGlvbiBUZWN...
  }
}

This question relates to the following question: Azure Logic App - JSON to XML Conversion

1 Answer 1

1

The xml function returns a Base 64 string, if you take that $content value and transforms from Base 64 to string, you will obtain the generated XML.

A simple proof of concept is generate an HTTP Request - Response Logic App, that receives a JSON and in the output you assign to de body @xml(triggerBody()).

When you call, you will see in the output the XML representation of your input.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.