Running the Utility

This section provides instructions for running the XML to flat file conversion utility from the command line.

For Java:

java XMLToFlat InputDirectory OutputFile.dat FileDescription.XML

or

java XMLToFlat -h

For C++ on Win32:

XMLToFlat InputDirectory OutputFile.dat FileDescription.XML

or

XMLToFlat -h

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

Parameters:

  • First: Path specification of the input directory (required). Either a relative or an absolute path name may be specified. The trailing directory separator character is optional.

  • Second: File specification of the output flat file (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.

  • Third: File specification of the file description document (required). 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.

Options:

  • -v (Validate): Validate the XML documents before processing. The documents are validated against the schema referenced in the document root Element.

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

Restrictions:

The restrictions are the same as those specified for the flat file to XML utility, plus the following.

  • As when flat files are the source, it is recommended (though not required) that field grammar Elements be specified in their record description Element in ascending order by offset. However, the sequence of fields in the input XML document must match the sequence defined in the record grammar.

  • The record identifier field Element need not be present in the input document. It will be converted if present, but the contents will be overwritten by the record identifier specified in the grammar.

  • Fields without contents in the input XML document are initialized to the fill character specified in the field's grammar.

  • If field definitions overlap one or more bytes in the record, the byte(s) are written from the last field specified in the grammar.

  • When writing fixed length records, the output record is initialized to ASCII spaces. If a different fill character is desired, it must be specified in a field grammar. If a byte in the record is not defined within a field, it is written with an ASCII space.

  • When writing variable length records, the output record is initialized to null characters and is not written beyond the end of the last field defined for the record. To use a fill character other than a null character, it must be specified in a field grammar. If a byte between fields that have content is not defined within a field grammar, it is written with a null character.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset