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 ellipsis (...) button next to the XML File field.
  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. 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 (NDMW).

  10. 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 NDMW 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 document from your specifications. To have the wizard create the inbound replication document metadata:

    1. Select the Create Replication Document Inbound Metadata check box.

      注意: 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. Specify a Document Name for the replication document.

    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.

相关主题