Highlighted
One Star

tAdvancedFileOutputXML: loop & group

Attached see a screenshot of the XML Tree configurator of the component tAdvancedFileOutputXML. My aim is to append an XML file with OutputData elements based on the entries from a database. I activated append modus and set "Node Status" to "loop element". Now Talend reports "Require set as loop and set as group at least". But there is no element that I can set as group element? How to handle this?
2 REPLIES
One Star

Re: tAdvancedFileOutputXML: loop & group

Hello ohofrichter - here's a clear explanation of how to use the tAdvancedFileOutputXML especially with multiple nodes and data flows. The top half of the article talks about the tFileOutputMSXML. You can skip that and go down to where you see "Multiple Loops (Thanks "Rock")"
http://bekwam.blogspot.com/2011/09/xml-output-from-multiple-data-sources.html
One Star

Re: tAdvancedFileOutputXML: loop & group

We have a scenario here and in the XML we have some elements which repeats multiple times within the same record. Could you please someone help us in generating xmls which has repeated elemnets. Below is the sample xml where we are trying to identify an approach to handle the repeated elements within the same record. Could you please help us in this?
In this example   <HeaderID> and service line tags are repeatable. and withing one headerID(claim ID) there could be a more than one serviceline and within the service line we have a child elements.
<Prarmacyclaims>
 <Prarmacyclaim>
  <HeaderID>123456
   <ServiveLine>
     <copay> 100 </copay>
      <covarage amount> 200000 </covarage amount>
      <Deductible> 500 </deductible>
    </ServiveLine>
    <ServiveLine>
      <copay> 200 </copay>
      <covarage amount> 300000 </covarage amount>
      <Deductible> 250 </deductible>
    </ServiveLine>
  </HeaderID>
  <HeaderID>456789
   <ServiveLine>
      <copay> 100 </copay>
      <covarage amount> 200000 </covarage amount>
      <Deductible> 500 </deductible>
    </ServiveLine>
    <ServiveLine>
      <copay> 200 </copay>
      <covarage amount> 300000 </covarage amount>
      <Deductible> 250 </deductible>
     <ServiveLine>
      <copay> 300 </copay>
      <covarage amount> 400000 </covarage amount>
      <Deductible> 250 </deductible>
   </ServiveLine>  
  <ServiveLine>
     <copay> 100 </copay>
     <covarage amount> 200000 </covarage amount>
     <Deductible> 500 </deductible>
  </ServiveLine>
  <ServiveLine>
     <copay> 200 </copay>
     <covarage amount> 300000 </covarage amount>
     <Deductible> 250 </deductible>
  </ServiveLine>
  </HeaderID>
 </Prarmacyclaim>  
<Prarmacyclaims>


Hirarchy
Pharcmacyclaim --> Headr ID (one per claims and person can have more than one claim) --> serviceline (under each header/calim there will be more than one line --> child elements (under service line there will be more than one child, like ex: copay amt, deductible, limt amt)...