I have the following input INPUT: JSON:
{
"abc": ""
}
Expected output: XML:
<abc xsi:nil="true"/>
dataweave used:
%dw 2.0
output application/xml
ns xsi http://www.w3.org/2001/XMLSchema-instance
---
(if(payload.abc == "")
(abc @(xsi#'nil': true):{})
else
null)
I am getting an error. Please help me with this