• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] List the file content of a folder and put the results in an XML file

#1 2009-11-17 13:12:09

braberyx
New member
Registered: 2009-11-17
Posts: 9

[resolved] List the file content of a folder and put the results in an XML file

Dear all,

I am required to list the file content of a folder and put the results in an XML file as follow:

<?xml version="1.0" encoding="UTF-8"?>
<files>
<file>
<filename>filename 1</filename>
</file>
<file>
<filename>filename 2</filename>
</file>
<file>
<filename>filename 3</filename>
</file>
</files>

How can i do that in talend? Which components do i need to use? Do you have relevant links/urls to a solution?

Or can i do the folder reading and xml creation in java and link the java program to talend job? I need to generate this xml file before sending it to a FTP server

Thanks for the help

Last edited by braberyx (2009-11-17 13:15:11)

Offline

#2 2009-11-17 13:53:51

shong
Talend team
Registered: 2007-08-29
Posts: 10297
Website

Re: [resolved] List the file content of a folder and put the results in an XML file

Hello guy
It is very easy to finish your requirement with talend ETL tool.smile
Please see my job.

out.xml:
<?xml version="1.0" encoding="ISO-8859-15"?>

<files>
  <file>
    <filename>forum8781.zip</filename>
  </file>
  <file>
    <filename>function.js</filename>
  </file>
  <file>
    <filename>in.csv</filename>
  </file>
  <file>
    <filename>Inna.doc</filename>
  </file>
  <file>
    <filename>log.xml</filename>
  </file>
  <file>
    <filename>out.csv</filename>
  </file>
  <file>
    <filename>out.xml</filename>
  </file>
  <file>
    <filename>stat.xml</filename>
  </file>
  <file>
    <filename>test.csv</filename>
  </file>
</files>

Best regards

          shong


Uploaded Images


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#3 2009-11-18 11:37:24

braberyx
New member
Registered: 2009-11-17
Posts: 9

Re: [resolved] List the file content of a folder and put the results in an XML file

Thanks for such a quick reply. I really do appreciate.

Offline

#4 2010-02-22 16:06:20

jkrfs
Member
Registered: 2009-11-19
Posts: 204

Re: [resolved] List the file content of a folder and put the results in an XML file

Thanks shong! This helped me too for a FTP Listing.

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] List the file content of a folder and put the results in an XML file

Board footer

Powered by FluxBB