How to transform xml to json and json to xml dynamically in Azure logic app

时间:2018-03-29 13:58:38

标签: azure azure-logic-apps

In Azure logic app how to convert xml to json or json to xml based on the requirement.

The data is dynamic i,e they can be in any format. And xpath expression is required to get the required node.

1 个答案:

答案 0 :(得分:1)

你说的函数是正确的,这里是一个从xml转换的输入中获取xpath值的例子:

  "Initialize_variable": {
            "inputs": {
                "variables": [
                    {
                        "name": "xpathValue",
                        "type": "String",
                        "value": "@xpath(xml(body('Get_blob_content_using_path')), 'string(/*[local-name()=\"Part\" and namespace-uri()=\"\"])')"
                    }
                ]
            },