0
打印這是DB
我的ResultSet{result={name=Sanjay,address=india,phone=xxxxxxxxxx}, {name=Amit,address=india,phone=xxxxxxxxxx}}
我想如下格式(XML格式)的幫助下變換在mule-
<?xml version="1.0" encoding="UTF-8"?>
<resultset>
<lines>
<line1>
<name>Sanjay</name>
<address>india</address>
<phone>xxxxxxxxxx</phone>
</line1>
<line2>
<name>Amit</name>
<address>india</address>
<phone>xxxxxxxxxx</phone>
</line2>
</lines>
</resultset>
變換消息我所做的變換消息,就像是:
{
resultset: {
lines :{(payload.result map
"line$$" :{
name:$.name,
address:$.address,
phone:$.phone
}
)}
}
}
對於這件T我得到的轉換
<resultset>
<lines>
<line0>
<name>Sanjay</name>
<address>india</address>
<phone>xxxxxxxxxx</phone>
</line0>
<line1>
<name>Amit</name>
<address>india</address>
<phone>xxxxxxxxxx</phone>
</line1>
</lines>
如何解決這個問題? 由於提前
謝謝@cooper,正常工作 – Sanjay