如何在 Azure 逻辑应用程序中动态地将 xml 转换为 json 并将 json 转换为 xml

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

在 Azure 逻辑应用程序中,如何根据需要将 xml 转换为 json 或将 json 转换为 xml。

数据是动态的,即它们可以是任何格式。并且需要xpath表达式来获取所需的节点。

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

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