The following example shows how you can use the dtxany2xml utility
command:
This
exercise uses sample files that are shipped with the product.
To create a map that can transform any input data into
XML output:
- From a command prompt, change your directory location:
cd c:/Program Files/IBM/WebSphere Transformation
Extender 8.1/ examples/general/states
- Enter the following command:
dtxany2xml
states.mtt Data:Input:UnitedStates sts.txt xml_output.xml XML_map
XML_log.log
This command produces
the following results:
- A new XML Schema – named using the schema name plus the selected
type name (states_UnitedStates.xsd).
- A new map source file (XML_map.mms) that
contains two maps:
- first map (XML_map)
- The input card references the original schema (states.mtt)
and input file (sts.txt).
- The output card references the newly created XML schema (states_UnitedStates.mtt ).
- The type is Doc XSD.
- The output file is xml_output.xml.
- The log file (XML_log.log) is created only when an error occurs.
- Using Map Designer, open install_dir\examples\general\states\
XML_map.mms.
- Build and run XML_map.
The input (sts.txt) is converted to XML
output (xml_output.xml). The input (xml_output.xml),
which was created by the first map, is converted back to text output
(sts.txt).