简体   繁体   中英

How to declare all the namespace in dataweave

My output xml from dataweave has the xml name space appearing in each element. Is there a way if all the namespace can appear in the root element

TIA

Here is the solution I found for my problem.

Example code from data weaver

info:{
  field @(id: "!23" , value: payload.Response.Detail.Header.ID  ): null
}    

Soution

info:{
  field @(id: "!23" , value: payload.Response.Detail.Header.ID  ): {}
}    

So as obvious from my answer I just replace the null part with {} , then it stops producing

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM