I have a problem with the XML Writer in Datastage 5.x that I hope somebody can help me with. I am writing out records in an un-sorted order from a hash file to an xml file.
Each record must transformed into the following:
<instrument>
</instrument>
<ownership>
</ownership>
<underlying-stocks>
</underlying-stocks>
I have this working perfectly
![Smile :)](./images/smilies/icon_smile.gif)
![Sad :(](./images/smilies/icon_sad.gif)
<instrument>
... record 1 instrument details
</instrument>
<ownership>
... record 1 instrument ownership details
</ownership>
<underlying-stocks>
... record 1 instrument underlying-stocks details
</underlying-stocks>
<instrument>
... record 2 instrument details
</instrument>
<ownership>
... record 2 instrument ownership details
</ownership>
<underlying-stocks>
... record 2 instrument underlying-stocks details
</underlying-stocks>
However what it actually does is this:
<instrument>
... record 1 instrument details
</instrument>
<ownership>
... record 1 instrument ownership details
</ownership>
<underlying-stocks>
... record 1 instrument underlying-stocks details
</underlying-stocks>
<ownership>
... record 2 instrument ownership details
</ownership>
<underlying-stocks>
... record 2 instrument underlying-stocks details
</underlying-stocks>
I think this is because record 1 instrument details are the same as record 2 instrument details. I'm not sure how to get around this as the logic seems to be in the "black box" of the XML Writer stage.
![Question :?:](./images/smilies/icon_question.gif)
Many thanks,
Chris