Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

 

 

Labels (3)
15 Replies
sushantk19
Creator
Creator

I didnt understand completely. Are you saying XML Field value should not be "Body"?? I just have Error_code as another option in drop down; Also the ouput generated in .csv file is coming as NULL with just two headers.
philippert
Contributor
Contributor

Doesn't it work with :
Loop : /gesmes/Cube/Cube
Mapping :
- currency : @currency
- rate : @rate
vapukov
Creator III
Creator III

sorry, I'm use tRESTClient,

in tRESTClient default output schema:

- statuscode

- body

- string

 

0683p000009M9Xu.png

 

 

 

btw, I miss leading / in my answer

it works with "/gesmes:Envelope/Cube/Cube/Cube"

 

0683p000009M9JP.png

philippert
Contributor
Contributor

In fact, it work with the loop as /gesmes:Envelope/Cube/Cube
sushantk19
Creator
Creator

yes, It is working fine now. Excellent!

Thanks a lot for your help!

vapukov
Creator III
Creator III

strange, must not work

 

the simplest way - if work with XML/JSON - use the proper tools for them, it helps a lot to debug:

0683p000009M9KS.png