Hi,
We are getting data from database and generating XML. Requirement is output XML has to close and open new tag after every 3 records.
I am using XML Input stage to generate XML.
Here is the sample XMLi have to generate.
<CustomerData>
<TRANSACTIONID>1</TRANSACTIONID>
<PLATENUMBER>JUNE618</PLATENUMBER>
<TRANSACTIONID>2</TRANSACTIONID>
<PLATENUMBER>JULY19B</PLATENUMBER>
<TRANSACTIONID>3</TRANSACTIONID>
<PLATENUMBER>RK004</PLATENUMBER>
</CustomerData>
<CustomerData>
<TRANSACTIONID>4</TRANSACTIONID>
<PLATENUMBER>JUNE618</PLATENUMBER>
<TRANSACTIONID>5</TRANSACTIONID>
<PLATENUMBER>JULY19B</PLATENUMBER>
<TRANSACTIONID>6</TRANSACTIONID>
<PLATENUMBER>RK004</PLATENUMBER>
</CustomerData>
<CustomerData>
<TRANSACTIONID>7</TRANSACTIONID>
<PLATENUMBER>JUNE618</PLATENUMBER>
<TRANSACTIONID>8</TRANSACTIONID>
<PLATENUMBER>JULY19B</PLATENUMBER>
<TRANSACTIONID>9</TRANSACTIONID>
<PLATENUMBER>RK004</PLATENUMBER>
</CustomerData>
Please give me some insight
Generate xml with 3 records within the tags
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 43
- Joined: Wed Feb 27, 2008 1:08 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Start by playing with the xmlOutput Stage. Take the xml that you have shown us above, save it into a disk file, and then use the xml metadata importer to bring it in and select the lowest level check boxes for each of the elements specified under <customer data>. PUt that tabledef on the input link of your xmlOutput Stage....choose the "aggregate" option and then feed a few rows from your flat file into it.....
...there will be more to it than that, but this will get you started.
Ernie
...there will be more to it than that, but this will get you started.
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>