1
我需要编写用于将csv转换为xml的数据编码代码。我的输出xml不应该包含xml声明('<?xml version='1.0' encoding='UTF-8'?>')
。使用dataweave写入文件时省略xml声明
dataweave代码:
%dw 1.0
%output application/xml
---
parent :{
child1:payload.input1,
child2:payload.input2
}
预期输出:
<parent>
<child1></child1>
<child2><child2>
</parent>
本次输出:
<?xml version='1.0' encoding='UTF-8'?>
<parent>
<child1></child1>
<child2></child2>
</parent>
请建议我在报头部分要添加的指令。谢谢
嗨@masetti,我发现的唯一的事情就是使用XSLT来省略xml声明。请参阅此链接:http://stackoverflow.com/questions/14800746/need-to-remove-xml-version-1-0-encoding-utf-16-from-the-xml –