When creating an XML file, the format of the XML file is usually pre-defined by an xml schema definition or .xsd file. DataMigrator lets you create a synonym from a schema definition and then map to that target in the same manner as a relational database table.
Single-segment and multiple-segment schemas are supported.
This technique is divided into two parts. In the first part, we create a synonym for the XML file; in the second, we use that synonym as the target of a flow.
In the example shown in the following image, the data source is DMORD. The target is described by the schema dmxord.xsd.
Refer to the sample data flow DMORDXML, for the complete example.
This is the structure of the schema (dmxord.xsd), which will be used to create a synonym to demonstrate this technique.
Note: To write to an XML target, the XML adapter must be configured on your server.
An XSD (XML Schema Definition) file contains a description of an XML file. This example shows how to create a synonym for the dmxord.xsd, which is installed with your server.
Note: For more information about creating synonyms for XML, please see Using the Adapter for XML in the Adapter Administration for UNIX, Windows, Open VMS, IBM i, and z/OS manual.
The Select adapter to configure or Select connection to create synonym dialog box opens.
The Select Document Instance for XML Synonym dialog box opens.
Note: The Create Synonym based on Document button allows you to create a synonym using an XML document alone. This example is for an xml target, so the xml document does not exist yet. This option is used for an xml source where no XML Schema Definition is available.
The Select Data Definition for XML Synonym dialog box opens.
The Create Synonym for XML dialog box opens.
For a complete example, see the ibisamp/dmordxml flow.
In the DMC:
The Transformations window opens.
iWay Software |