【发布时间】:2017-08-02 18:39:41
【问题描述】:
我有一个生成一些 xml 的 dataweave 脚本。
%dw 1.0
%output application/xml skipNullOn="everywhere"
%namespace soap http://www.w3.org/2003/05/soap-envelope
%namespace ns http://www.mycompany/2015/07
---
{
soap#Envelope: {
soap#Header: {
},
soap#Body: {
ns#GetVehDetails: {
}
}
}
}
}
它会产生这样的东西......
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header/>
<soap:Body>
<ns:GetVehDetails xmlns:ns="http://www.mycompany/2015/07">
如何更改 dataweave 脚本以在根元素处输出 xml 命名空间声明:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:ns="http://www.mycompany/2015/07">
<soap:Header/>
<soap:Body>
<ns:GetVehDetails>
【问题讨论】: