More than one XML Repetition path

Dedicated to DataStage and DataStage TX editions featuring IBM<sup>®</sup> Service-Oriented Architectures.

Moderators: chulett, rschirm

Post Reply
bakul
Participant
Posts: 60
Joined: Wed Nov 10, 2004 2:12 am

More than one XML Repetition path

Post by bakul »

Is it possible to specify more than one XML Repetition path?
Regards,
Bakul
bakul
Participant
Posts: 60
Joined: Wed Nov 10, 2004 2:12 am

Post by bakul »

I'll try to provide some more information.
I want to generate an XML document of the form

Code: Select all


<header>
<city>
  <customer> 
     <name></name>
     <account></account>
     <account></account>
     <account></account> 
   </customer>
   <customer>
     <name></name>
     <account></account>
     <account></account>
   </customer>
   <branch>
     <name></name>
     <service></service> 
     <service></service>
   </branch>
   <branch>
     <name></name>
     <service></service> 
     <service></service>
     <service></service>
   </branch>
</city>
</header>
Now to do this I have to make both /header/city/customer/account/text() and /header/city/branch/service/text() as repetition paths. Since both have to be included in the same XML document,the input to XML consists of 4 columns. The input is of the form:

Code: Select all


branchname branchservice customername customeraccount
   ABC    Loan                 
   ABC    Credit card     
   ABC    DD
   XYZ     Loan
   XYZ     Credit Card
                                cust1            A1
                                cust1            A2
                                cust2            A3
                                cust2            A4
                                cust2            A5

Both /header/city/customer/account/text() and /header/city/branch/service/text() are specified as repetition paths.Now the problem is that as the branchservice column is specified before the customeraccount column in input for XML Output Stage, the XML for the branch part is generated as required,however for the customer part,with each change in customeraccount,all the tags till city are closed and reopened.

I want to ask if it is possible to generate such a document using the XML output stage.

Thanks and Regards,
Bakul
Post Reply