This is a command line utility and library to convert XML files to CSV files, according to a configuration provided by the user.
xml2csv works well for the following scenarios:
- You have a set of XML files that:
- all need converting.
- some of them need converting, based on file name.
- some of them need converting, based on the contents of each XML file.
- You require a specific mapping and ordering of fields in the output CSV file.
- CSV field names are dependant on the content of the XML file.
- You need to flatten the hierarchical structure of XML files in to repeating fields.
- Any combination of the above at once!
This software is maintained on GitHub at http://www.github.com/andybrodie/xml2csv. See the GitHub project wiki to get started, specifically the Tutorial.
- Using a user-supplied configuration, xml2csv reads input XML files and creates output CSV files.
- Processes multiple XML files that match user-specified filters.
- Create many CSV files from a single set of XML files based on 1..n relationships between XML nodes and their descendants.
- Built as a standalone Jar file with no dependencies other than the Oracle Java 1.6 JRE or later, for easy deployment.
- Inline, multi-value mappings, allowing for a variable number of values for a single record.
- Pivot Mapping allow CSV structure to be determined by the contents of XML files.
- Paid support available from Locima Ltd.
- Scalable to as many XML input documents as you need. Only one XML document needs to be held in memory at one time.
- Use via a command line interface or integrated in to your own applications.
- Source code licensed under the Microsoft Public License (MS-PL), so you can exploit with confidence!
- Fully commented source code so you can understand and extend easily.
- Based on open source software (Apache Commons, Apache Xerces, QOS slf4j, Saxonica Saxon HE, Eclipse Jar-In-Jar Loader).
- Build with Apache Ant and Ivy using a single command (
ant build-jar
).
xml2csv relies on the following third party software, each with it's own separate license:
- Apache Commons CLI licensed under the Apache License Version 2.0
- Apache Xerces 11.2 licensed under Apache License Version 2.0
- Jar-in-Jar-Loader licensed under the Eclipse Public License 1.0
- Junit 4.0 licensed under Eclipse Public License Version 1.0
- Qos Logback licensed under the Eclipse Public License
- Qos SLF4J licensed under the MIT licence
- Saxonica Saxon 9 HE licensed under Mozilla Public License 1.0
Copyright 2014-2015 Locima Ltd. (e-mail: enquiries (at) locima.com
or website: www.locima.com)
Licensed under the Microsoft Public License (http://www.microsoft.com/en-us/openness/licenses.aspx)