I have an xml file with repeated info such as the following.
example:
<PRODUCT_INFO>
<PROD_CD>PROD_CD1</PROD_CD>
<PRODUCT_INFO>
<PRODUCT_INFO>
<PROD_CD>PROD_CD2</PROD_CD>
<PRODUCT_INFO>
I am required to store the first occurence (i.e. PROD_CD1) under a Field A and the second occurence (i.e. PROD_CD2) under a Field B.
I am able to extract the value for the first occurence. However unable to retrieve the second occurence. Please advice. Thanks.
Extracting multiple occurences in XML file
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Set up a stage variable to report whether you've already seen the opening PROD_CD tag - if you have, transfer the value to the second field; if you haven't, transfer the value to the first field.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: