Map your database to an existing schema
After completing the new Project Wizard you will enter the Project tab of the core application.
This section explains the process of setting up a translation from your database's data model to the existing XML schema identified during the New Project wizard.
It is important to consider...
Creating XML mappings to an existing schema requires an understanding of both the source data and target schema. In order to achieve the correct mapping, it may be necessary to create column groups, table joins, constants or other bespoke mappings.
Settings entered in the New Project wizard such as the project name, and the project's location are shown above the Database to XML Mapping window.
Generate XML Mappings
After completing the Project Wizard, the tables will be greyed out in the Database to XML mapping section of the Project tab and no XML paths will exist apart from the Root Element. The root element is displayed in the XML path opposite the Database node in the Name column.
You can change the root element by clicking on the drop-down arrow in the XML Path column and selecting a different root element.
When you open up one of the tables, you will see that its columns and database types are also greyed out, indicating that none of the columns are mapped to XML.
You can build mappings from the XML Path column using the context driven xmlpath drop-down list to select the schema elements you wish to map the data in your tables and columns to (see screenshot below).
Image of Database to XML Mapping at the start of the mapping process - using an existing schema.
Edit XML Mappings
You can edit the 'XML path' values and overwrite the contents, or simply pick a different mapping from the available drop-down list.
It may be necessary to create column groups, table joins, constants or other bespoke mappings. Mapping Translations covers these topics in more detail.
If you want to change the names used in the XML path you can edit the 'XML path' values. If there are columns in your database that you do not want to publish click off the 'Enabled' check box for that column. Read Database to XML Mapping for an overview of the mapping process, covering each part of the Database to XML Mapping window as well as certain tools which with help quick editing.
Search in Mappings
You can search for specific mappings by either database name or by XML path within the project. Type in a string in the search field and click 'Search'. The mappings where the name or the XML path contains the search string will be expanded, allowing you to view and edit them; all other mappings will be collapsed.
The search is performed in both 'Name' and 'XML path' columns and is NOT case sensitive.
In the example above, the search text was set to 'classifica', so 'classificationGrp' in 'LANDMARK' was expanded as it contains 'CLASSIFICATION' and 'CLASSIFICATION_CODESPACE', which both contain the search text in their names.
After creating your Database to XML Mapping, you can read Preview then validate your XML to find out more about previewing and validating your xml data to ensure your mappings are correct.
If you need to edit your database, schema repository, XML content, or geometry settings, see Settings Tab for more information. For creating SQL filters, see the SQL Filters Tab section and for configuring the data output settings, see Desktop Settings Tab.
When you're ready to publish your data, see Publish and validate output files.