IBM Database Add-Ins for Visual Studio
Changing 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 change XML data in 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 change XML data in a DB2 table or
view:
Retrieve the data
from the DB2 table or view.
In the Result Data section, click the cell in
which to change the XML data, click the down arrow, and then
select XML Designer on the drop-down menu.
The DB2 XML Designer
window opens.
Optional: Type your changes to the XML source on the Text View
page.
Optional: Click the Grid View tab, expand the
hierarchical grid until a data table is displayed, and then
type your data changes in the table.
Optional: Generate sample XML to use as a template for new XML
data.
Click the Sample XML tab.
Expand the Advanced Options section.
Select the XML schema to use to generate the sample XML.
Click Generate Sample .
If the schema that you selected contains more than one root
element, in the Select
Root window, select the root to use for generating the
sample XML.
Use commands on the shortcut menu to select and copy the
sample XML, and then paste it in the Text View page.
Change the element text and attribute values in the
sample XML to the text and values that you want.
Optional: Click Open File , and then browse to
and select the file that contains the XML data to use in the cell.
The contents of the file that you select are displayed in the
Text View page.
Optional: Validate the changed XML data.
Expand the Advanced Options section.
Select the XML schema to use for validating the XML data.
Click Validate .
If there are validation errors, fix the errors, and then
click Validate again. Repeat this step
until there are no validation errors.
Click OK in the DB2 XML Designer window.
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.