[resolved] talend extract xml field

One Star

[resolved] talend extract xml field

I have this job in talend that is suppose to retrieve a field an loop through it.
My big problem is that the code is looping through the xml fields but it's returning null. Here is a sample of the xml:
<?xml version="1.0" encoding="ISO-8859-1"?>

<nome id="" order="">photo1</nome>
<nome id="" order=""></nome>
<nome id="" order=""></nome>
<nome id="" order=""></nome>


Now using the ExtractXml component I am trying to get the "fotos" element.
I have tried to change the xpath query and the xpath loop query but the result is either I don't loop through the field or I get the null in the value field in the tmap.
You can see the I have retrieved 4 items from the xml but what I get is null in the "nome" field. There must be something wrong with the xpath but I can't seem to find the problem Smiley Sad
Hope someone can help me out.
Notes: I am using talendv4.1.2 on ubuntu 10.10 64bit
Ok I am able to loop through the xml field
I changed the xpath loop query in the file to:
and then changed the loop query in the component to:
"/fotos/nome" and in the column xpath I didn't put anything.
The problem is now that I loop 37 times and I get always the same result of the same block with XML
<nome id="" ordem="">photo1.jpg</nome>
<nome id="" ordem="">photo1.jpg</nome>
<nome id="" ordem="">photo1.jpg</nome>
<nome id="" ordem="">photo1.jpg</nome>

Now I just want to retrieve the value of nome and not have it always be the same. What xpath do I have to use!!???
Ok I figured it out. I put a "." in the xpath Smiley Happy