header

Convert CSV to XML

XMLBlueprint's CSV to XML Converter is an easy and powerful tool to convert data in CSV format to XML.

The converter enables you to:

  • Create and save your own XML templates and scenarios.
  • Get started easily by using default values.
  • Preview the CSV values as well as the conversion result, before converting.

csv to xml

Wizard

XMLBlueprints offers a simple wizard to help you through the conversion steps, just follow the steps:

  1. Choose the CSV file you want to convert.
  2. Choose the scenario you want to use: you can always choose the example provided, or choose to create your own.
  3. Check the preview and if it is not correct, edit the scenario or XML template.
  4. Convert your document.

Variables and repetitions

To make more complex transformations possible, you can use variables to refer to the headers and columns in your CSV document. Also, you can repeat the XML in the XML template for each row in your document.

JavaScript

Text between {script} and {endscript} is executed as JavaScript. This way you can leave out empty cells, or convert all text to lowercase. You can use any JavaScript function you like.

Converting CSV to XML from the Command Line

You can start XMLBlueprint XML editor to create, modify or run a conversion scenario for your CSV document, but sometimes you only need to convert a document and you don't want the editor to open. XMLBlueprint provides commands for you to convert CSV documents from the command line on Windows.

At the Command prompt type:

  • ConvertCSVtoXML {Scenario} {CSV File} {Output File}

Scheduling your CSV to XML conversions

Once you have created your scenario you can also run it from the command line. To run conversions on a regular basis, e.g. every day at 6 pm or every two weeks, you can use Windows' Task Scheduler. You find an example of how this works in the help.

Download a free, fully-functional 15-day trial of XMLBlueprint. There are no restrictions.