Four Stars

Read XML file with attributes

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

 

 

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Six Stars

Re: Read XML file with attributes

@drentsch, you can try this to extract the values,

 Capture.PNGCapture.PNGCapture.PNG

 Output:

.-------+------------------+--------------.
| tLogRow_1                               |
|=------+------------------+-------------=|
|LINE_NO|DOMAIN            |VALUE         |
|=------+------------------+-------------=|
|40.0 |ET-NUMMER           |961860800     |
|40.0 |LIEFERANTENARTIKEL  |4102-230V.O.61|
|40.0 |EAN                 |7611386037073 |
'-------+------------------+--------------'

- JG
4 REPLIES
Six Stars

Re: Read XML file with attributes

@drentsch, you can try this to extract the values,

 Capture.PNGCapture.PNGCapture.PNG

 Output:

.-------+------------------+--------------.
| tLogRow_1                               |
|=------+------------------+-------------=|
|LINE_NO|DOMAIN            |VALUE         |
|=------+------------------+-------------=|
|40.0 |ET-NUMMER           |961860800     |
|40.0 |LIEFERANTENARTIKEL  |4102-230V.O.61|
|40.0 |EAN                 |7611386037073 |
'-------+------------------+--------------'

- JG
Ten Stars

Re: Read XML file with attributes

just alternative way:

Screen Shot 2017-06-03 at 4.03.17 PM.png

 

Screen Shot 2017-06-03 at 4.03.27 PM.png

-----------
Highlighted
Four Stars

Re: Read XML file with attributes

Thanks, this is working fine
Six Stars

Re: Read XML file with attributes

Glad to hear that @drentsch

- JG