IBM Books

XML Extender Administration and Programming

Enabling XML collections

Enabling an XML collection parses the DAD file to identify the tables and columns related to the XML document, and records control information in the XML_USAGE table. Enabling an XML collection is optional for:

If the same DAD file is used for composing and decomposing, you can enable the collection for both composition and decomposition.

You can enable an XML collection through the XML Extender administration wizard, using the dxxadm command with the enable_collection option, or you can use the XML Extender stored procedure dxxEnableCollection().

Using the administration wizard

Use the following steps to enable an XML collection.

  1. Set up and start the administration wizard. See Starting the administration wizard for details.
  2. Click Work with XML Collections from the LaunchPad window. The Select a Task window is displayed.
  3. Click Enable a Collection and then Next. The Enable a Collection window is displayed.
  4. Select the name of the collection you want to enable in the Collection name field from the pull-down menu.
  5. Type the DAD file name into the DAD file name field or click ... to browse for an existing DAD file.
  6. Optionally, type the name of a previously created table space in the Table space field.

    The table space will contain new DB2 tables generated for decomposition.

  7. Click Finish to enable the collection and return to the LaunchPad window.

From the DB2 command shell

To enable an XML collection, enter the dxxadm command:

Syntax:
dxxadm enable_collection
>>-dxxadm---enable_collection---dbName---collection---DAD_file-->
 
>-----+-----------------+--------------------------------------><
      '--t--tablespace--'
 

Parameters:

dbName
The name of the database.

collection
The name of the XML collection. This value is used as a parameter for the XML collection stored procedures.

DAD_file
The name of the file that contains the document access definition (DAD).

tablespace
An existing table space that contains new DB2 tables that were generated for decomposition. If not specified, the default table space is used.

Example: The following example enables a collection called sales_ord in the database SALES_DB using the DB2 command shell. The DAD file uses SQL mapping and can be found in DAD file: XML collection - SQL mapping.

dxxadm enable_collection SALES_DB sales_ord getstart.dad         

After you enable the XML collection, you can compose or decompose XML documents using the XML Extender stored procedures.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]