• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Looping through the elements of a node that have the same name

#1 2010-07-08 06:49:53

gokul
New member
Registered: 2010-07-08
Posts: 2

Looping through the elements of a node that have the same name

Hi,

I am using JasperETL(3.2.3.r35442)  to extract data from a xml file and put it into mysql table.

I have an xml file similar to:
     .
     .
     .
  <Title id="XMLFILE">
  <CompareState>overall site performance (% of Site Total).</CompareState>
  <Detail>XXX</Detail>
  <Detail>ABC</Detail>
  <Name>Please help me</Name>
  </Title>
    .
    .
    .

While extracting the desired fields from the file, I would like to extract just the 2nd <Detail> element alone (ABC). I want XXX to be ignored. In this case, I cant use <Detail> node for Xpath loop expression because, I have already set some other element in the xml file as the Xpath loop expression.

When I just drag the <Detail> element into the Field to extract column, I get XXX all the time (since it is the first element). I am not able to loop to the ABC.

Is there a solution for this??

Kindly help me out here please!!

Thanks a million in advance!!

Kind regards,
gokul.

Last edited by gokul (2010-07-08 07:01:51)

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Looping through the elements of a node that have the same name

Board footer

Powered by FluxBB