• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Is it possible to have loops for different segment in the same level

#1 2010-10-13 22:47:15

jobyjoseph
Member
Registered: 2010-07-02
Posts: 25

Is it possible to have loops for different segment in the same level

Tags: [group, loop, xml]

Is it possible to have loops for different segment in the same level

Example:
<empolyee>

<details> .................................................................loop1
   <detail1>
         <attribue1>abc</attribute1>
         <attribue2>abc</attribute2>
         <attribue3>abc</attribute3>
    </detail1>
  <detail2>
         <attribue1>abc</attribute1>
         <attribue2>abc</attribute2>
         <attribue3>abc</attribute3>
   </detail2>
   
     .......
     ....... etc

   <detail100>
         <attribue1>abc</attribute1>
         <attribue2>abc</attribute2>
         <attribue3>abc</attribute3>
   </detail100>
</details>
<items>------------------------------------------loop2
        <item1>
           <attribue1>abc</attribute1>
           <attribue2>abc</attribute2>
           <attribue3>abc</attribute3>
        <item1>
        <item2>
           <attribue1>abc</attribute1>
           <attribue2>abc</attribute2>
           <attribue3>abc</attribute3>
        <item2>

         ......
         ....... etc

        <item100>
           <attribue1>abc</attribute1>
           <attribue2>abc</attribute2>
           <attribue3>abc</attribute3>
        <item100>         

<items>
</empolyee>         


details and items are two segments in same level and is it possible to have loops for both at same time


Thanks
Jjoseph

Offline

#2 2011-02-17 18:30:29

jobyjoseph
Member
Registered: 2010-07-02
Posts: 25

Re: Is it possible to have loops for different segment in the same level

My obective is to create an XML as mentioned above from another xml, Issue ia m facing is i can gerenerate the xml using tfileoutxml components only if one loop in one level, ie i can do loop1 alone in the above example , not loop1 and loop2 together, Please advice me resolve this issue

Offline

#3 2011-02-18 09:44:57

shong
Talend team
Registered: 2007-08-29
Posts: 10310
Website

Re: Is it possible to have loops for different segment in the same level

Hi
With 'append the source xml file' option on tAdvancedFileOutputXML can fit your need, output the first segments to a xml file for first time and then append the second segments to existing xml file.

Best regards
Shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Is it possible to have loops for different segment in the same level

Board footer

Powered by FluxBB