【问题标题】:How to transform xml to json and json to xml dynamically in Azure logic app如何在 Azure 逻辑应用中动态将 xml 转换为 json 和 json 为 xml
【发布时间】:2018-03-29 13:58:37
【问题描述】:

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

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

【问题讨论】:

  • 您能否更新问题以描述您的实际问题?您正确识别出回答您问题的 xml() 和 json() 函数。

标签: azure azure-logic-apps


【解决方案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()=\"\"])')"
                    }
                ]
            },

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-03-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-04-08
    • 1970-01-01
    相关资源
    最近更新 更多