You can use the XML schema that you registered in the last
lesson to validate the insertion of XML data into an XML column. Use
the Insert into XML Column wizard to simplify the process of inserting
XML data into an XML column.
To use the XML schema to validate the insertion of XML
column data:
- In the Data Project Explorer, right-click the customer XML
file that you generated in a previous lesson, and select Insert
into XML column.
Tip: You can also
open this wizard by right-clicking an XML column in the Data Source
Explorer and selecting Insert into XML Column.
- On the first page of the wizard, expand the TEST_SCHEMA
relational schema and the CUSTOMER table, and select the INFO column.
- On the next page, select Specify a registered
XML schema, select TEST_SCHEMA.XSR_CUSTOMER, and click Finish.
The content from the XML file is inserted into the INFO column.
You can view the messages and results in the SQL Results view. You
can also view the inserted data by right-clicking the INFO column
in the Data Source Explorer, and selecting
Sample Contents.
Tip: You can also insert XML data into a column by using the
table data editor. To use the table data editor, right-click a table
in the Data Source Explorer and select , then click the ellipsis
[...] button next to an XML column and click Import.