Generating an XSM from a PDM Via the XML Builder Wizard

The XML Builder Wizard helps you build an XML model (XSM) that will be used to generate SQL/XML queries for retrieving data from databases. It is more powerful than the standard PDM-XSM generation, as it helps you to customize the XML hierarchy to be built, and sets up the XSM to retrieve data from relational databases supporting SQL/XML, and for generation of an annotated schema.

  1. In your PDM, select Tools > XML Builder Wizard to open the XML Builder Wizard to the Model Selection page:


    Select whether you want to create a new XML model or update an existing XML model currently open in your workspace.

  2. Click Next to go to the Tables and Views Selection tab:


    Select the tables and views you want to generate. By default, all tables and views are selected.

  3. Click Next to go to the XML Hierarchy Design tab:


    On this tab, you construct the XML hierarchy that you want to generate:

    • The left-hand pane lists the tables and views that you have selected

    • The right-hand pane displays the XML hierarchy to be generated, containing a default root element.

    The following tools are available to help you build your hierarchy:

    Tool

    Description



    Properties – Opens the property sheet for the selected table, view, or column.



    Add Object - Adds the selected PDM object to the XML hierarchy.



    Create Default Hierarchy for Selected Objects - Adds the selected PDM objects to the XML hierarchy.

  4. You can build your XML hierarchy using the following techniques:
    • Specify whether columns will be generated as elements or attributes by using the radio buttons above the panes.

    • Drag and drop a table, view, or column onto a node in the XML hierarchy. You must respect the PDM hierarchy; you cannot create an XML hierarchy between two elements if there is no reference between their corresponding tables, and a parent table cannot be placed beneath one of its children.

    • Right-click a table, view, or column and select Add to add it to the last selected node in the XML hierarchy.

    • Rename an element or attribute by clicking its node and typing a new name.

    • Create new elements and attributes not in the PDM, and Sequence, Choice and All group particles, by right-clicking an XML node and selecting New > object.
    • Delete an XML node by right-clicking it and selecting Delete.

  5. Click Finish to generate the XSM.


    In the case of an update to an existing XSM, your hierarchy will be created as a new root in the model.

    The SQL/XML extension file is automatically attached to the XML model to enable you to generate SQL/XML queries from global elements. For more information, seeXML Modeling > Working with XML and Databases.