XML Objects

Creating an XML Schema

  1. In the Database Explorer window, right click the XML Schemas folder, and then click New XML Schema in the shortcut menu.

    Note

    If there is no such menu command, this instance of the Oracle server does not support XML objects, and you can not create XML schema on it.

  2. Specify the owner of the XML schema.
  3. Specify if the schema should be loaded from the file or from the URL and provide the source name. You can choose the Specify Text option to put XML text manually without loading it from any source. If option Public is selected the object will be available out of the other schemas.
  4. Go to the Advanced tab, and set the options for the schema generation.
  5. Save the document to have the XML Schema created. You can switch to the Text view to inspect generated SQL query.

To view XML schema properties, in the Database Explorer window, expand the XML Schemas folder, right click a required object, and then click View properties in the shortcut menu.

Note

It is not allowable to edit stored XML schemas.

Dropping XML Schemas

Dropping XML Schemas provides some peculiarities. There can be objects depending on the given XML schema, so be careful while deleting XML schema, for these objects will become inaccessible for editing and deleting operations if the source XML schema is dropped but the dependent objects are not.

Four options for XML schema deleting exist:

  • DELETE_RESTRICT: Schema deletion fails if there are any tables or schemas that depend on this schema.
  • DELETE_INVALIDATE:Schema deletion does not fail if there are any dependencies. Instead, it simply invalidates all dependent objects.
  • DELETE_CASCADE: Schema deletion will also drop all default SQL types and default tables. However the deletion fails if there are any stored instances conforming to this schema.
  • DELETE_CASCADE_FORCE: Similar to CASCADE except that it does not check for any stored instances conforming to this schema. Also it ignores any errors.

To drop an XML Schema, expand the XML Schemas folder in Database Explorer. Right-click a required object, and click Delete in the shortcut menu. The dialogue asking if the object has to be dropped appears. Select Yes to delete an XML Schema.

Creating an XML Table

  1. Click the New Database Object button on the Devart - Standard toolbar and specify an object type.
  2. Select the XML Table type in the dialog.

    Note

    If there is no such menu command, this instance of the Oracle server does not support XML objects, and you can not create XML table on it.

  3. Input the table name.
  4. Specify the owner of the XML schema, choose the schema to contain the object being created, the source XML schema and the element to be stored in the table.
  5. You can also specify storing options of the table.
  6. Click the Create button. If specified name is unique the table will appear in Database Explorer.

Deleting an XML Schema

  1. In the Database Explorer window, expand the XML Schemas folder.
  2. Right-click a required schema, and then click Delete in the shortcut menu.
  3. Click Yes in the appeared dialog.

Note

When you drop a table all data containing in it is lost.