Page 1 of 1

More than one XML Repetition path

Posted: Wed Nov 24, 2004 7:49 am
by bakul
Is it possible to specify more than one XML Repetition path?

Posted: Wed Nov 24, 2004 10:30 pm
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