Home
Andy Brodie edited this page Mar 9, 2015
·
9 revisions
xml2csv is a Java 1.6 based command line utility and library that can be used to convert XML files to CSV (comma separated values) files.
- 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
).
See the Tutorial page for a tutorial on how to get started with xml2csv.
See the following wiki pages for more aspects on controlling the mapping from input XML documents to CSV files:
- Groups - Group numbers control how different fields are combined in to one or more records.
- Greedy - Mappings can be Greedy or Lazy, which affects whether fields are split over rows or "inlined".
- Pivot - Pivot mappings allow dynamic definition of mappings based on data.
- FAQ - Frequently Asked Questions and answers to common problems.