Promoting an element value to root node attribute - how?
Greetings,
Can someone suggest the best way to create the sample output message from the sample input message? Both are shown below. The input message has a lot of "employee" elements. Only one will have a "title" attribute of "boss". I need to create an output message "bossname" attribute on the root element and assign it the value of the input "employee" element that has the "boss" designation in the input message. I also need to eliminate the "boss" element when creating the output message.
I don't know how to get started with this. Should I be doing this within BizTalk or outside BizTalk? Is there a functoid I can use? Any suggestion of a good practice would be appreciated.
Input message:
<root>
<employee title="worker">James</employee>
<employee title="boss">Suzi</employee>
<employee title="worker">Charlie</employee>
</root>
Output message:
<root bossname="Suzi">
<employee title="worker">James</employee>
<employee title="worker">Charlie</employee>
</root>
Thanks,
BCB

