Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
talend777
Contributor
Contributor

tXMLMap how to get multiple attribute values

Hi Team,

i have a xml input like below from an API , now i am able to use this is tXMLMap and derive Customer_code, Customer_name-Descriptor but when i need to extract wd:ID the values are not coming correctly.

<wd:Report_Data xmlns:wd="urn:com.abcWDXYZ.report/REPORTABC">

<wd:Report_Entry>

<wd:Customer_Code>1CS00</wd:Customer_Code>

<wd:Customer_Name wd:Descriptor="AMS_XYZ LCD">

<wd:ID wd:type="WID">4351ec787ddaf8c532092c4c</wd:ID>

<wd:ID wd:type="Organization_Reference_ID">CSH_0000003</wd:ID>

<wd:ID wd:type="Custom_Organization_Reference_ID">C0003</wd:ID>

</wd:Customer_Name>

<wd:Customer_ID>CSH_CUS_1CS0000003</wd:Customer_ID>

since

<wd:ID wd:type= has multiple attribute values like WID, Org_id ,Custom org id , what expression i can use to get the right values

I am trying to pass this in different columns like below

Customer_code-- Customer_name-- WID--Org_id-- ,Custom org id---

i tried different combinations but not sure which expression would do the trick

[row11.string:/wd:Report_Data/wd:Report_Entry/wd:Customer_Name/wd:ID/@wd:type/WID] 

thank you

1 Reply
Anonymous
Not applicable

Hi

The loop element should be set as below to extract all WID value.

/wd:Report_Data/wd:Report_Entry/wd:Customer_Name/wd:ID

069U10000027qQYIAY.png

You may need to further process the output of tXMLMap to get the desired output format.

 

Regards

Shong