This discussion is archived
2 Replies Latest reply: Oct 19, 2012 10:28 PM by 796275 RSS

Increment values within XML document and generate new file

796275 Newbie
Currently Being Moderated
Good day Gurus of the Java World,

I have a XML file and would like to generate a 100 unique files of this one file.
The tags that need to be unique are UniqueID (alpha numeric field), TranAmount (numeric filed) and RefNumber (alpha numeric field).
The rest of the tags can remain as is.

How do I go about doing this? Please assist.
<Payment>
 <UniqueID>48a6bd92-19c8-11e2-a2ba-000000000000</UniqueID>
 <EffectiveDate>20121018</EffectiveDate>
 <TranCode>1000</TranCode>
 <TranAmount>000000000123456</TranAmount>
 <TranDate>20121018</TranDate>
 <TranTime>014532</TranTime>
 <Check></Check>
 <DrCrInd>CR</DrCrInd>
 <Name>ABC</Name>
 <BrCode>1234</BrCode>
 <RefNumber>SALARYWAGE</RefNumber>
 <AccNumber>123456789</AccNumber>
 <BackoutCount>0</BackoutCount>
</Payment>

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points