This Example Demonstrates how to convert multiple XML files into CSV files
 Here is an XML source example

<Table>
<Record>
<ID>1</ID>
<Company>James Bond Production</Company>
<Amount>13</Amount>
</Record>
<Record>
<ID>2</ID>
<Company>Green Cloud</Company>
<Amount>14</Amount>
</Record>
</Table>

Here is XSLT used transformation:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="UTF-8"/>
<xsl:template match="Table">
<xsl:text>ID,Company,Amount</xsl:text>
<xsl:text>&#xA;</xsl:text>
<xsl:for-each select="Record">
<xsl:value-of select="ID"/>
<xsl:text>,</xsl:text>
<xsl:value-of select="Company"/>
<xsl:text>,</xsl:text>
<xsl:value-of select="Amount"/>
<xsl:text>&#xA;</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

 Notes: We kept XSLT simple sot to is easy to understand and modify if necessary. 

Steps to follow
  • Download and install Advanced ETL Processor [Link]
  • Download and Unzip example [Link]
  • Create a new transformation and open the .ats file

Convert multiple XML files into CSV format 

  • Double click on the reader and select source XML Directory

XML Data Reader

  • Repeat the process for the data writer
  • Press the green arrow to run the transformation
 How it works
  1. Data Reader scans the source directory and loads files into memory one by one
  2. The transformer converts file in memory into CSV using XSLT
  3. Data Writer writes results into the target directory
  • To amend the  transformation double click on it

The transformation uses XML XSLT Transformation Function to convert XML to CSV and it also changes file name extension 

ETL Data Transformer

  • To change XML XSLT Transformation Function properties double click on it.

XML Example

  •  Amend XSLT Transformation if necessary

XSLT Editor

  •  Press transform to see the result

XSLT Transformation Result

Please contact us if you need help with transforming the data

Visit ETL Tools Forum

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 
 
Xerox
Swiss banking
Bank Of Oklahoma
Red Cross
Alta Pacific bank
Copeinca
Gas alberta
NHS
Royal Brunei
First Oklahoma bank
Noresco
Iqvia

Testimonials

What customers say about us

  • swissbanking

    I used Advanced ETL Processor in 2 Enterprises for many business processes and Business automation (outside finance department). I did not find any other tool with so many functions and broad flexibility for that Price! If you need support for bugs or solution design you will get it very fast. Best Support I have ever seen.

    Lionel Albrecht
  • iqvia

    IQVIA and DB Software Laboratory (DBSL) partnered in 2010 and have been working in close cooperation ever since. Over this period of time, DBSL software components formed an integral part of a large number of IQVIA applications currently used by over 20 UK NHS Trusts (Hospitals).

    Dmitry Dorsky,
    Director
  • xerox

    The product is easy to learn and once a developer understands the ETL way for solving the problem at hand, the developer's productivity will increase. Even our DBAs now uses the ETL software to quickly create solutions instead of SSIS or SQL jobs.

    Daniel Fung
    Solutions Architect

Read ETL Software customers feedback

This site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies