【问题标题】:Update value after loading xml file加载 xml 文件后更新值
【发布时间】:2021-05-13 15:33:32
【问题描述】:

我正在使用 readUrl 命令加载以下 xml 文件

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <a>
         <b>xyz</b>
         <c>
            <d>false</d>
            <e>false</e>
            <f>true</f>
         </c>
      </a>
   </soapenv:Body>
</soapenv:Envelope>

在与 readUrl 命令相同的数据编织中 - 我想将 xml e 值从 false 更新为 true

有人可以帮忙吗

干杯,

强尼

【问题讨论】:

    标签: mule dataweave anypoint-studio mulesoft


    【解决方案1】:

    使用 Mule 4.3.0 中可用的更新运算符可用于根据需要更新值:

    %dw 2.0
    output application/xml
    ns soapenv http://schemas.xmlsoap.org/soap/envelope/
    var soapMessage=readUrl("...","application/xml")
    ---
    soapMessage update {
            case .soapenv#Envelope.soapenv#Body.a.c.e -> true
    }
    

    【讨论】:

      猜你喜欢
      • 2012-08-25
      • 1970-01-01
      • 1970-01-01
      • 2020-02-25
      • 1970-01-01
      • 2020-10-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多