Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have to map a xml-file, my problem is that this file contain attributes. Thie file look like this:
<DeliveryItem>
<LineNo> 40.00</LineNo>
<PartId>
<IdentNo Domain="ET-NUMMER">961860800</IdentNo>
<IdentNo Domain="LIEFERANTENARTIKEL">4102-230V.O.61</IdentNo>
<IdentNo Domain="EAN">7611386037073</IdentNo>
</PartId>
How can i extract the values for ET-NUMMER, LIEFERANTENARTIKEL,EAN ?
Second problem in the second line in the XML make reference to the .dtd file:
<!DOCTYPE BDD SYSTEM "ABB BDD.dtd">
But when i leave this line in i get no rows from talend.
Thanks for help
@drentsch, you can try this to extract the values,
Output:
.-------+------------------+--------------.
| tLogRow_1 |
|=------+------------------+-------------=|
|LINE_NO|DOMAIN |VALUE |
|=------+------------------+-------------=|
|40.0 |ET-NUMMER |961860800 |
|40.0 |LIEFERANTENARTIKEL |4102-230V.O.61|
|40.0 |EAN |7611386037073 |
'-------+------------------+--------------'
@drentsch, you can try this to extract the values,
Output:
.-------+------------------+--------------.
| tLogRow_1 |
|=------+------------------+-------------=|
|LINE_NO|DOMAIN |VALUE |
|=------+------------------+-------------=|
|40.0 |ET-NUMMER |961860800 |
|40.0 |LIEFERANTENARTIKEL |4102-230V.O.61|
|40.0 |EAN |7611386037073 |
'-------+------------------+--------------'
just alternative way:
Glad to hear that @drentsch
If you can't loop on the object, this syntaxe works too : IdentNo/@DOMAIN.
Thanks.
Hi All,
I have the below scenario:
output from my REST API is as below
|<?xml version="1.0" encoding="UTF-8"?>
<gesmes:Envelope xmlns:gesmes="http://www.gesmes.org/xml/2002-08-01" xmlns="http://www.ecb.int/vocabulary/2002-08-01/eurofxref">
<gesmes:subject>Reference rates</gesmes:subject>
<gesmesender>
<gesmes:name>European Central Bank</gesmes:name>
</gesmesender>
<Cube>
<Cube time='2020-03-24'>
<Cube currency='USD' rate='1.0843'/>
<Cube currency='JPY' rate='119.99'/>
<Cube currency='THB' rate='35.533'/>
<Cube currency='ZAR' rate='19.0754'/>
</Cube>
</Cube>
</gesmes:Envelope>|null |
I want to extract the values from two fields i.e currency and rate in two seperate fields in a .csv file.
currency rate
USD 1.0843
JPY 119.99
Job design and configuration is attached which is not working as of now. I am very new to talend. can you please help?
Hi,
try to use:
Loop XPath "gesmes:Envelope/Cube/Cube/Cube"
and XPath query:
"@currency"
"@rate"
regards
Unfortunately, no luck. same result.
-------+----.
| tLogRow_2 |
|=-------+---=|
|currency|rate|
|=-------+---=|
'--------+----'
[statistics] disconnected
XML Field could be "string" (not the expected Body 🙂 )