问题描述
我有以下输入 输入: JSON:
{
"abc": ""
}
预期输出: XML:
<abc xsi:nil="true"/>
使用的数据织法:
%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