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

Five Stars

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 

tExtractXMLMapField.JPG.
 talend.JPGpurse multiple loop in xml


Accepted Solutions
Highlighted
Community Manager

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

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

----------------------------------------------------------
Talend | Data Agility for Modern Business
Five Stars

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

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

All Replies
Highlighted
Community Manager

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

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

----------------------------------------------------------
Talend | Data Agility for Modern Business
Five Stars

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

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
Community Manager

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

Great, thanks for your feedback!
----------------------------------------------------------
Talend | Data Agility for Modern Business