Running the Utility


This section provides instructions for running the CSV to XML Converter utility from the command line.

For Java:

java CSVToXMLBasic InputFile. CSV OutputFile.XML

or

java CSVToXMLBasic -h

For C++ on Win32:

CSVToXMLBasic InputFile. CSV OutputFile.XML

or

CSVToXMLBasic -h

Options follow the parameters except for the help option, which may be specified by itself.

Parameters:

  • First : File specification of the input CSV file (required). The specification may include the full or relative path name. If no path name is specified, the file is assumed to reside in the current working directory. The full file name must be specified, but there is no restriction on the extension name .

  • Second : File specification of the output XML document (required). The specification may include the full or relative path name. If no path name is specified, the file will be created in the current working directory. An extension may be specified, but if not specified the file will be created without one. If a file with the specified name already exists, it will be overwritten.

Options:

  • -h (Help) : Display help message and exit without further processing.

Restrictions:

  • A quotation mark (") may only be used as a delimiter to bracket the entire text context of a column. Quotation marks may not otherwise appear in the input file.

  • A column may have a maximum of 1,024 characters (may be modified by parameter in the program source).

  • A row may be no longer than 16,384 characters (may be modified by parameter in the program source).

  • A maximum of 99 columns per row is supported, that is, columns may be numbered from 1 to 99. Columns numbered higher than 99 will not appear in the output XML document.

  • There is no absolute limit on the number of rows; the number is only practically limited by system memory.

  • The output XML document is not validated against a schema or DTD. (Validation will be introduced in Chapter 5.)

We need to note one thing that isn't a restriction. XML uses special characters such as the left and right angle brackets (< and >, respectively) for key parts of its syntax. Unlike the way in which some EDI processors create documents in the X12 EDI syntax, you don't need to be concerned about whether or not any of these special characters appear in your data. The utility will handle them properly. I'll discuss this more at the end of this chapter in regard to predefined entities.



Using XML with Legacy Business Applications
Using XML with Legacy Business Applications
ISBN: 0321154940
EAN: 2147483647
Year: 2003
Pages: 181

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net