< Previous | Next >

Registering the XML schema

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:

  1. 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.
  2. On the Selection page, select the customer schema and click Next.
  3. In the Relational schema name field, select TEST_SCHEMA.
  4. In the XML schema name field, type XSR_CUSTOMER. This meaningful name signifies that this is an XML schema registered object for customer.xsd.
  5. Click Next. You should see the customer XML schema document in the XML schema documents and dependencies list.
  6. 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.
  7. 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.
Screen capture showing the customer XSD file displayed in the Data Source Explorer, as described.
< Previous | Next >

Feedback