IBM Database Add-Ins for Visual Studio

Reviewing XML Data in 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 review the XML documents that are stored in rows of the table or view. You can review an XML document in source form or see its contents as a hierarchical grid. You can also transform an XML document and see the transformed data rendered in HTML.

After reviewing transformed XML data, you can print or copy its viewable data, export the viewable data to a spreadsheet application, or view the source text and save it to a file.

If you transform an XML document in the IBM Data Designer, the XML document remains in its original source form in the database. The XML data is transformed only when it is displayed in the HTML Visualizer window.

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

To review the XML data in a DB2 table or view:

  1. Retrieve the data from a table or view.
  2. To see the XML document that is in a cell of the result data grid:
    1. Click a cell in a column of XML data, click the down arrow, and then select XML Designer on the drop-down menu.

      The DB2 XML Designer window opens, with the Text View page showing the XML source document.

    2. To see the contents of the XML column as a hierarchical grid, click the Grid View tab. Click an element link on the page to see its subelements and attributes.
    3. Close the DB2 XML Designer window.
  3. Optional: View and process transformed XML data.
    1. Transform the XML data that is in a column of the database table.
    2. In the Result Data section, click a cell in a column of XML data, click the down arrow, and then click HTML Visualizer on the drop-down menu.

      The HTML Visualizer window opens and displays the transformed XML document.

    3. To print or copy the viewable data, export the viewable data to a spreadsheet application, or view the source text and save it to a file, right-click in the Value box, and then use the appropriate command on the shortcut menu.
    4. Close the HTML Visualizer window.

After you have reviewed the XML data in a column, you can import XML data to a cell in the result data grid, and update or delete the XML data that is displayed in a cell.

See Also

Managing XML Data | Importing XML Data to DB2 Tables and Views | Changing XML Data in DB2 Tables and Views | Deleting XML Data from DB2 Tables and Views


.NET Development Forum   DB2 FAQs

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