Hi ,
My requirement is need to append XML tags and then send data.
I have defined a copybook with required field tags. I use XML GENERATE to generate the tags in xml format in cobol (i.e) this will append start and end tags as per copybook defined variable.
for example
Copybook field name :side
Output after using XML generate: <side>2</side>
But, for few field, i dont want the same start tag to be appended at end.
like,
currently using the above mentioned logic fileds are populated as below,
<reference-id1-type>ABCD</reference-id1-type>
<reference-id1>123456</reference-id1>
<reference-id2-type>EFGH</reference-id2-type>
<reference-id2>12345677</reference-id2>
<reference-id3-type>IJKL</reference-id3-type>
<reference-id3>12345667</reference-id3>
<reference-id4-type>MNOP</reference-id4-type>
<reference-id4>1111111</reference-id4>
<reference-id5-type>RSTU</reference-id5-type>
<reference-id5>1234455678</reference-id5>
but i want it to be populated in below way.....
<referenceIDGroup>
<referenceID referenceIDType="ABCD">123456</referenceID>
<referenceID referenceIDType="EFGH">12345677</referenceID>
<referenceID referenceIDType="IJKL">12345667</referenceID>
<referenceID referenceIDType="MNOP">1111111</referenceID>
<referenceID referenceIDType="RSTU">1234455678</referenceID>
</referenceIDGroup>
is there any way to populate it this way? pls let me know your suggestions.
Thanks