Specifying the source tables and target DTD file
Using the relational database (RDB) to XML mapping editor, you can select data from one or more relational tables and map it to elements and attributes of an XML document. The tables must exist in the workbench before you can specify them in the RDB to XML Mapping wizard.
To start the RDB to XML mapping editor,...
- Select...
File | New | Other | XML | RDB to XML MappingIf you cannot see the XML option, select the Show All Wizards check box.
- Click Next.
- Select the folder that will contain the mapping session file and type the name of the mapping session file, for example: MyMap.rmx Your filename must end in .rmx
- Click Next.
- Select the radio button that corresponds to the type of mapping you want to create.
- Select RDB table to XML mapping to map a relational table to an XML file, or
- SQL query to XML mapping to map a SELECT or FULLSELECT statement with an ORDER BY clause to an XML file.
- Click Next.
- If you are mapping an RDB table to XML, select the RDB tables that you want to use.
- If you are mapping an SQL query to XML, select the SELECT of FULLSELECT statement that you want to use. The statement must contain an ORDER BY clause. It must be a valid statement and it should be saved. If you select an invalid statement, the editor will open without any content.
- Click Next.
- Select the DTD file that you want to use as your target file. If you want to use a DTD file that is not currently in the workbench, click Import File and fill in the fields in the Import wizard as necessary.
- Click Next.
- Select the appropriate Root Element. When your DTD is transformed into an XML document for mapping, the selected element will be used as the root element.
- Click Finish.
The .rmx file that stores your mapping information is created and launched in the editor.
In the default setting, the RDB to XML mapping editor consists of three panes: the Tables pane contains the relational tables or SQL statement, the XML pane contains the XML information, and the Overview pane contains a summary of the mappings. The XML perspective also contains an Outline view that lists the mappings.
Once you have specified your source and target files, you can begin mapping.
Parent topic
Mapping from relational databases to XML files
Related concepts
Relational database to XML mapping (visual DAD builder)
Related tasks
Editing an RDB to XML mapping
Creating the mapping for an RDB_node DAD file
Creating the mapping for an SQL statement DAD file
Creating join conditions