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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

XML file with carriage return

Hi there I am trying to parse an xml file into a postgres db and everything seems to be working fine going from the tfileInputXML to the tMap and finally onto the tPostgresqlOutput the only problem is the way my xml files are set up it does not take in all the details for example here is what the xml file contains
<id>1234</id>
<name> John Smith</name>
<address> 123 Main Street
SomeTown
SomeCountry</address>
The problem is only the id 1234 the name John Smith and part of the address get entered 123 Main Street but because of the carriage return I am missing the rest of the address is there anyway to rectify this problem in Talend or will all of the xml files need to be edited to remove the carriage returns.
Labels (4)
10 Replies
Anonymous
Not applicable
Author

Hi rhall_2.0 it ended up being just the linefeed ascii value and therefor was able to fix the problem using the method you provided. Thanks very much for your help. Do you have much knowledge of the tFileList component? I can iterate through all the xml files I have in one folder by using a tFileList following onto my tfileinputxml component. i.e DataFolder1-> xml files
However the way my data is set up it comes through two folders. i.e. Home Folder->Data Folder1 -> xml files and there are 12 different data folders is there anyway to set up one or two tfilelist components to iterate from the home folder and then take the current directory? I have set it up with two tFileList components and the first to read directories of which 12 are found but when I set the second tFileList to ((String)globalMap.get("tFileList_1_CURRENT_FILEDIRECTORY")) and to retrieve files it does not seem to work as expected.
EDIT: I have just managed to rectify the problem mentioned above please disregard