Using the Register an XML Schema wizard, you can register
an XML schema in the DB2® XML schema repository (XSR).
You must complete this XML schema registration before you can use
XML schemas to process XML documents.
To register the XML schema:
- In the Data Project Explorer view, right-click the XML
schema folder in your project, and select Register
an XML Schema. The Register an XML Schema
wizard opens.
- On the Selection page, select the customer schema and click Next.
- In the Relational schema name field,
select TEST_SCHEMA.
- In the XML schema name field, type XSR_CUSTOMER. This meaningful name signifies that this is an XML schema registered
object for customer.xsd.
- Click Next. You
should see the customer XML schema document in the XML
schema documents and dependencies list.
- Select the customer XML schema document.
Tip: On this page, you can also select the option to generate
a CLP script that you can run later. In this case, the CLP script
is generated, and the registration is also completed. You can generate
a CLP script without completing the registration if you use the Generate
XML Schema Registration CLP Script wizard.
- Click Finish to register the XML
schema.
The registration process completes, and the results, including
any errors or messages, are displayed in the SQL Results view. You
can view the registered XML schema document in the Data Source Explorer.