Repeating elements in XML Output Stage
Posted: Thu Mar 07, 2013 3:29 pm
Just wondering if someone can help me with this.
I have this in a flat file.
The XML schema is this,
Expected output:
But what I get is, this. The ORG tags are repeating. How do I make it not repeat for every new /ORG/LINE/LINECODE/ID.
Any ideas are welcome.
I have this in a flat file.
Code: Select all
020902,020902001,1200110100Z001
020902,020902001,1200110100Z002
Code: Select all
/ORG/CLASS/ITEM/text()
/ORG/PROG/ITEM/text()
/ORG/LINE/LINECODE/ID/text()
Code: Select all
<ORG>
<CLASS>
<ITEM>020902</ITEM>
</CLASS>
<PROG>
<ITEM>020902001</ITEM>
</PROG>
<LINE>
<LINECODE IdentificationSystem="VA">
<ID>1200110100Z001</ID>
</LINECODE>
</LINE>
<LINE>
<LINECODE IdentificationSystem="VA">
<ID>1200110100Z002</ID>
</LINECODE>
</LINE>
</ORG>
Code: Select all
<ORG>
<CLASS>
<ITEM>020902</ITEM>
</CLASS>
<PROG>
<ITEM>020902001</ITEM>
</PROG>
<LINE>
<LINECODE IdentificationSystem="VA">
<ID>1200110100Z001</ID>
</LINECODE>
</LINE>
</ORG>
<ORG>
<CLASS>
<ITEM>020902</ITEM>
</CLASS>
<PROG>
<ITEM>020902001</ITEM>
</PROG>
<LINE>
<LINECODE IdentificationSystem="VA">
<ID>1200110100Z002</ID>
</LINECODE>
</LINE>
</ORG>