Running the Utilities

Refer to Chapters 2 and 3 for the full instructions for running the XML to CSV and CSV to XML Converters from the command line. This section describes the additional parameters and restrictions.


For both CSVToXMLBasic and XMLToCSVBasic, we add a validate option.

  • -v (Validate) : Validate the input instance document before processing, or validate the created document before writing it to disk. Input documents are validated against the schema specified in the root Element noNamespaceSchemaLocation attribute. The default schema for output documents is CSVFile.xsd.

For CSVToXMLBasic, we add two qualifiers.

  • -sSchemaFileName : Override the default schema file name of CSVFile.xsd. SchemaFileName represents the local name of the schema file without the directory specification.

  • -o (Omit) : Omit the schema declaration in the output document.

Options o and v are incompatible. If option o is specified, option s has no effect.


The following restrictions are imposed when using schema files other than CSVFile.xsd.

  • For validation of output instance documents, the schemas must be located in the directory pointed to by the BBSCHEMAS environment variable.

  • Schemas must be in W3C XML Schema language and must be valid according to that language. DTDs are not supported.

  • The schema must have elementFormDefault set to "unqualified."

  • Namespace prefixes may not be used on any Elements in instance documents.

  • Element names may not be changed.

  • The Element content of the root CSVFile and Row Elements may not change other than to reduce the number of ColumnXX Elements in the sequence.

  • In the sequence for the Row Element, the value of the minOccurs Attribute of the ColumnXX Elements may be either "0" or "1". A max Occurs Attribute value of "0" may cause validation errors, while a value greater than "1" may have unpredictable results.

  • The types of the ColumnXX Elements may be changed as long as the types used have simple content models.

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

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: