IBM Database Add-Ins for Visual Studio

Importing XML Data to DB2 Tables and Views

If a table or view in your DB2® database is defined with one or more columns of data type XML, you can use the IBM® Data Designer to import XML data to rows of the table or view.

Requirement:  The DB2 table or view must be defined with one or more columns of data type XML.

To import XML data to a DB2 table or view:

  1. Retrieve the data from the DB2 table or view.
  2. In the Result Data section, click the cell to import the XML data to, click the down arrow, and then click XML Designer on the shortcut menu.

    The DB2 XML Designer window opens.

  3. Click Open File, and then browse to and select the file that contains the XML data to import.

    The contents of the imported file are displayed in the Text View page.

  4. Optional: Validate the imported XML data.
    1. Expand the Advanced Options section.
    2. Select the XML schema to use for validating the XML data, and then select the Reference check box for the schema.
    3. Click Validate.
    4. If there are validation errors, fix the errors, and then click Validate again. Repeat this step until there are no validation errors.
  5. Click OK in the DB2 XML Designer window.
  6. In the Data view of the IBM Data Designer, save the data.

See Also

IBM Data Designer


.NET Development Forum   DB2 FAQs

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