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
/tooption specifies that you are converting a file from its native format to XML; the/fromoption specifies that you are converting an XML file to the file type specified in the/converteroption.- The XML Converter specified in the name argument for the
converteroption can take settings for properties specific to that converter. For example,/converter EDI:newline=crindicates that the carriage return (cr) is to be used as the line separator (newline) character.property_name=valuepairs cannot include blanks. For example,newline=platformis valid,newline = platformis not.- Use
/analyzeto analyze and convert an EDI stream; use/reportif you want to save the analysis report (by default, it is written to a temp file and deleted after the conversion). The/analyzeand/reportoptions can only be used when converting EDI to XML (that is, when you are using the/tooption.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
/outoption.- You can use dashes (-) instead of forward slashes (/) to separate options – for example,
-toinstead of/to.- To generate XML Schema, replace the
/tooption with the/schemaoption. 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.