Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Not able to purse multiple non nested loop element XML file using tExtractXMLFiled

I'm trying to call an wsdl where i found and xml response https://ufile.io/8iaes 

but if I use tExtractXMLField in Talend I can provide only one loop XPath query e.g.  "/ns1:getAllAMODetailsReturn/ns1:amoList/ns1:amoList/ns1:allattr/ns1:allattr" so I can fetch all the record in this loop easily. but outside this loop there are the separate more loops e.g. association 

"/ns1:getAllAMODetailsReturn/ns1:amoList/ns1:amoList/ns1:association/ns1:association" and I need all of them too, for reference I have attached the scrren shot 

0683p000009LvnK.jpg.
 0683p000009LvTS.jpgpurse multiple loop in xml

Labels (1)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hello
It is impossible to configure multiple loop elements on tExtractXMLField component. I would suggest you to use multiple tExtractXMLField components to parse each loop, and then do an inner job on tMap to merge the two input data together if needed , for example:
....twebserviceInput--main--tHashOutput
|
onsubjobok
|
tHashInput1--main--tExtractXMLField1--main--tMap....>
                                                                            |
                                                                       lookup
                                                                           |
                                                     tHashInput2--main--tExtractXMLField2

Hope it helps you.

Regards
Shong

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Hello
It is impossible to configure multiple loop elements on tExtractXMLField component. I would suggest you to use multiple tExtractXMLField components to parse each loop, and then do an inner job on tMap to merge the two input data together if needed , for example:
....twebserviceInput--main--tHashOutput
|
onsubjobok
|
tHashInput1--main--tExtractXMLField1--main--tMap....>
                                                                            |
                                                                       lookup
                                                                           |
                                                     tHashInput2--main--tExtractXMLField2

Hope it helps you.

Regards
Shong

Anonymous
Not applicable
Author

Hi Shong
Thanks for your reply. I got an alternative solution for that. Yes I use
multiple tExtractXMLField but no tHashInput/output
1. tExtractXMLField_1 I use a loop and return all the elements as
String and in XML path I map another array (loop element) but return type
is Document
2. then I use another tExtractXMLField_2 the input is the output of
tExtractXMLField_1 then parse the Document type input and return all (input
+ output).

BR
UnmarshalExcept
Anonymous
Not applicable
Author

Great, thanks for your feedback!