IBM Database Add-Ins for Visual Studio

Testing Annotated XML Schemas  (DB2)

After you save an annotated XML schema, you can test its map links. The test runs the DB2 decomposition stored procedure named SYSPROC.XDBDECOMPXML, which uses the annotated XML schema to extract data from an XML document that you specify.

In addition to running SYSPROC.XDBDECOMPXML, the test process can validate the XML document against the annotated XML schema.

If no errors occur during the testing process, you can load the data that is in the XML document into the appropriate relational database columns.

Requirement:  The annotated XML schema must be open in the IBM XML Schema Mapping Designer and saved in a database schema.

To test an annotated XML schema:

  1. Right-click in the Mapping Editor section of the Annotated XML Schema view of the designer, and then select Test on the shortcut menu.

    The Test Form window opens.

  2. Click Ellipsis button to browse to and select the XML document to use for the test.
  3. Optional: To validate the selected XML document against the annotated XML schema, set the value of Validation to True.
  4. Optional: To load the data in the XML file to columns in the relational database, set the value of Commit after execution to True.

    This option is exercised only when no errors occur during the test.

  5. Click Test.

If the test fails, the following message is displayed in the Result field in the Test Form window:

   Error decomposing XML document.

A message that describes the error condition is displayed in the IBM Output Message Pane.


See Also

Annotating XML Schemas | Saving Annotated XML Schemas | IBM XML Schema Mapping Designer


.NET Development Forum   DB2 FAQs

© Copyright IBM Corporation 2002, 2019. All Rights Reserved.