Specifying source and target files

You must specify your DTD, XML, or XML schema source and target files in order to create your XML mapping file.

If you specify a DTD or XSD file, the XML mapping wizard will generate sample XML documents that will be used in the mapping. The XML documents will be organized using the root elements that you specify in the New XML Mapping wizard.

If you specify an XML file, it must include either a DOCTYPE or an xsi:schemaLocation tag that indicates the corresponding DTD or XSD file.

The following instructions apply to the Resource perspective, but they will also work in many other perspectives 

To start the XML mapping editor, follow these steps:

  1. In the workbench, create a project to contain your files.
  2. Click File > New > Other > XML > XML mapping and click Next . If you cannot see the XML option, select the Show All Wizards check box.
  3. If you are prompted to enable XML Development capabilities, click OK.
  4. Select the folder that will contain the mapping file.
  5. Type the name of the mapping file, for example: MyMap.map. Your filename must end in .map.
  6. Click Next.
  7. In the text field, enter a target namespace for the new mapping or accept the default.
  8. Select the Input and Output root components:
    1. To select your global elements or types for the root inputs, click Add to the right of the inputs pane. You can add one or more input components to your mapping.
    2. To select a global element or type for the root output, click Add to the right of the outputs pane. You can only select one output component for your mapping.
  9. Click Next.
  10. To add a sample XML input file for testing a mapping transformation, click Add. Select a file and click OK.
  11. Click Finish.

The XML editor is displayed and launches the XML mapping file. You can now begin to map the source and target nodes.

Related concepts
XML mapping editor
Related tasks
Mapping nodes

Feedback