Using the Fairlight CSV to XML Converter, you can generate XML data from a simple two-field-per-line CSV format, including on-the-fly Base64 file encoding and encapsulation. This is an excellent companion for programs that don't inherently support XML exporting.
This command-line based program may be used directly, or used in automated systems. It is possible to build a GUI or web-based wrapper around the program (see the demo page below for a live example of such a creature).
Currently supported platforms are:
The self-extracting executable version for Windows meets all of these requirements for you. That version does not require perl be installed at all.
This program can be tested via a web front-end designed specifically for this purpose.
Run the Win32 installer.
Unpack the compressed tar or zip archive into any directory you choose. A subdirectory named csv2xml-install will be created, and all program and documentation files are present within this subdirectory. You may relocate the program from this directory to elsewhere.
Edit the first line of the program file to reflect the location of your perl binary!
csv2xml [options] csv_filename
This option denotes to what file the XML output is written.
This option lets you change the comma separator to some other arbitrary character (or characters).
This option lets you change the double-quote character to some other arbitrary character (or characters). An example would be a single-quote.
This option removes all non-value whitespace and newlines from the XML output, creating one solid chunk of XML rather than a nicely formatted version.
This specifies the path to which any decoded Base64 files will be saved.
This option is for internal csv2xml development, and/or bug report traces. This option should not normally be used unless you enjoy creating large files for no reason.
This option returns the program version information.
This option returns the program changelog information.
This option returns the program help (a briefer summary of the options) in a self-paging fashion.
The format for the CSV this file uses is very specific. Please adhere to the rules that follow.
Anywhere a non-value element (a "container" element that has no child elements should begin, the following line should be output:
"__FLT_TAG_OPEN__","fieldname"
Anywhere a non-value element (see above) should close, the following line should be output:
"__FLT_TAG_CLOSE__","fieldname"
Anywhere attributes start for an element, the following line should be output immediately after either 1) the __FLT_TAG_OPEN__ line that opened the non-value element, or 2) immediately after the line that gives a value-containing element in the case of a plain data element(the last line type depicted below):
"__FLT_ATT_OPEN__","fieldname"
Anywhere attributes end for an element, the following line should be output:
"__FLT_ATT_CLOSE__","fieldname"
All other lines representing elements with a value should be in the format:
"name","value"
The following is an example of a CSV that would generate valid output:
Note how the attributes for container fields follow tag open lines, and the attributes for the plain data element (newfile) both follow their respective lines.
You can copy the text from the textarea above, save it to a local file, and upload it into the demonstration to see the resultant XML, if you wish.
If you prefix an element's value with B64: in the form of:
"Image_Data","B64:/path/to/file"
...then the whole contents of the indicated file will automatically be encoded in Base64 and placed in the field.
Original Release.
Control-M fix for cross-platform file use.
This software remains the property of Fairlight Consulting, and license to use the program is sold to users. Fairlight CSV to XML Converter is licensed at a cost of $495.00 USD per server on which it is installed. Each license fee entitles you to use the program on one server, in any role you require.
Upon receipt of payment for a license, program will be delivered to the licensee via email at the email address associated with the PayPal payment.
Upgrades for the product are free when moving to new minor and bugfix point-release versions. Major version upgrades will be paid upgrades. Fairlight Consulting reserves the right to change this policy in the future, with no prior warning.
There is no warranty for this software. This software is offered "AS-IS" and without warranties as to performance or merchantability or any other warranties, whether expressed or implied.
Good computing practice dictates that any program should be thoroughly tested with non-critical data before deploying it for production. The user assumes the entire risk of using the program. In no event shall Fairlight Consulting be held liable for loss of data, failure of performance, or any other damages, be they real or perceived.
If you agree to these terms, click here to order Fairlight CSV to XML Converter!