Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Create a variable containing a string by reading an XML file

Hi everyone, I'm new on talend.
I have an XML file from which I read some parameters, after which with these parameters I have to construct a string to save in a global variable which will then be called in the tSOAP element. the string to be created must be of the following type:

 

000002;000001;18000101;HRANAGRAPHIC;IDPRCATE;;001||000002;000001;18000101;HRANAGRAPHIC;NAME;;001||000002;000001;18000101;HANAGRAPHIC;SURNAME;;001 

where ";" separates each parameter I read from my XML, while "||" separate each record I always read from my XML. Someone very kindly could tell me the work flow I have to implement to do this. I would be very grateful.

Labels (4)
2 Replies
Anonymous
Not applicable
Author

I suggest you first read you XML file and format to CSV,

tFileInputMSXML ---> tLogRow

After that step, we can then help
Anonymous
Not applicable
Author

Hi,

 

     You can read the XML data through XML parsing components of Talend and get the output records. Like dgm suggested, you can push the data to an interim file with your specific data separation requirements to use semicolon and double pipe.

0683p000009M63O.png

 

This interim file can be used to process the data further in your flow. Since you are making an interim file, please remember to delete this file after your use as a house keeping measure.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂