Creating tables and IDOs from XML documents

Use the XML to IDO Wizard to create SQL tables and Intelligent Data Objects (IDOs) based on data found in XML documents.

  1. In Design Mode, click the XML to IDO Wizard button on the Design Mode toolbar.
  2. In the XML to IDO Wizard, click the Open XML File button next to the XML File field.
    Alternatively, if you want to work on an existing project template XML file. click Open Template.
  3. In the Windows Open dialog box, navigate to and open the XML file on which you want to base your new tables/IDOs/forms.

    The wizard automatically parses the XML code in the document. As it does so, it attempts to find and capture any schema information that is referenced by the XML file. If no schema information is found, then all elements are defaulted to a string data type with a length of 30.

  4. Create one or more collections to be mapped to SQL tables and IDOs.

    This is done by selecting from the XML code what nodes and elements to use in constructing your new tables/IDOs/forms. On this first page of the wizard, you can create either scalar collections or table collections, or both. For more information about these collection types, see About the XML to IDO Wizard.

  5. Optionally, if you have multiple collections, designate one collection to be considered the primary collection.
    To do this, select the check box to the right of the collection row for the collection that is to be considered the primary collection. If you designate one collection as the primary collection, all other collections are then created as subcollections.
  6. Verify that you have at least one primary key identified for each collection.
  7. Click Next.

    If you have multiple collections with one collection designated as the primary collection, the next page of the wizard is used to establish the linkage between the tables/IDOs. If this is the case, proceed to the next step.

    If there is no collection is designated as the primary collection, skip the next step.

  8. Specify the Primary Collection Property and the Subcollection, and then click Add Link.

    Repeat as required for additional subcollections.

  9. If you want to save as a template, click Save Template.
  10. Click Next.

    The next page of the wizard displays only if there are multiple table collections. This page provides options to define the settings for the primary collection, if there is one collection designated as the primary collection. Otherwise, this page provides those options for the first collection defined in the list on the previous page.

    At this point, even though the name of the wizard does not change, the options and following pages are virtually the same as for the New Data Maintenance Wizard.

  11. To continue the process, use the procedure provided in the topic, Using the New Data Maintenance Wizard, starting with Step 3.
    The exception to the regular Data Maintenance Wizard process is that, after you have specified all options related to the collections and their properties, the wizard presents you with a page on which you can specify whether to create the metadata for an inbound replication documen or an Application Event System (AES) event handler from your specifications. If you select to create an inbound replication document, you can also create the metadata for an outbound replication document. If you choose to create an AES event handler instead, you cannot create an outbound replication document.

    To have the wizard create the inbound or outbound replication document metadata or AES event handler:

    1. Select Create Replication Document Inbound Metadata or Create AES Event Handler.
      Note:  The BOD noun-verb combination cannot exist already in the Replication Document Incoming Cross-References form. It it does, the wizard displays a warning, and you cannot create the replication document inbound metadata until you delete the combination on the Replication Document Incoming Cross-References form.
    2. The Document Name is pre-populated from previous screens. You can modify this field if necessary.
    3. Optionally, select Create Replication Document Outbound Metadata. If you have selected Create AES Event Handler this option is disabled.
    4. Select a site from the Target Site list.

    The BOD noun and BOD verb should already be specified on this page.

After the wizard is finished processing, make sure you check all opened form to verify that what you expected to be created is in fact what the wizard did create.