Command Line Usage
You can run DataDirect XML Converters™ from the command line.
To specify a native file to be converted to XML:
CmdLine /to [/analyze] [/report filename] /converter name[:property_name
=value
...] /in filename [/out filename]To specify an XML file to be converted to a native format:
Usage Notes
Following are some usage notes for running DataDirect XML Converters™ from the command line:
- The
/to
option specifies that you are converting a file from its native format to XML; the/from
option specifies that you are converting an XML file to the file type specified in the/converter
option.- The XML Converter specified in the name argument for the
converter
option can take settings for properties specific to that converter. For example,/converter EDI:newline=cr
indicates that the carriage return (cr
) is to be used as the line separator (newline
) character.property_name
=value
pairs cannot include blanks. For example,newline=platform
is valid,newline = platform
is not.- Use
/analyze
to analyze and convert an EDI stream; use/report
if you want to save the analysis report (by default, it is written to a temp file and deleted after the conversion). The/analyze
and/report
options can only be used when converting EDI to XML (that is, when you are using the/to
option.See Chapter 3, Analyzing EDI to XML Conversions for more information.
- Use
/in -
to read from the standard input.- To write to the standard output, omit the
/out
option.- You can use dashes (-) instead of forward slashes (/) to separate options – for example,
-to
instead of/to
.- To generate XML Schema, replace the
/to
option with the/schema
option. See XML Schema Generation for more information.Example
The following example uses the EDI XML Converter to convert the input file, 831.x12, to an XML file, my831.xml using default values for the EDI XML Converter:
The 831.x12 sample file and others are in the \examples directory where you installed XML Converters. To learn more about the examples, see Example Applications.