History | Edit

Oxygen XML Editor includes a tool that allows you to create an XML Schema from the structure of a database.

To convert a database structure to an XML Schema, use the following procedure:
  1. Select the Convert DB Structure to XML Schema action from the Tools menu.

    Result: The Convert DB Structure to XML Schema dialog box is opened and your current database connections are displayed in the Connections section.

  2. If the database source is not listed, click the Configure Database Sources button to open the Data Sources preferences page where you can configure data sources and connections.
  3. In the Format for generated schema section, select one of the following formats:
    • Flat schema - A flat structure that resembles a tree-like view of the database without references to elements.
    • Hierarchical schema - Display the table dependencies visually, in a type of tree view where dependent tables are shown as indented child elements in the content model. Select this option if you want to configure the database columns of the tables to be converted.
  4. Click Connect.

    Result: The database structure is listed in the Select database tables section according to the format you chose.

  5. Select the database tables that you want to be included in the XML Schema.
  6. If you selected Hierarchical schema for the format, you can configure the database columns.
    1. Select the database column you want to configure.
    2. In the Criterion section you can choose to convert the selected database column as an Element, Attribute, or to be Skipped in the resulting XML Schema.
    3. You can also change the name of the selected database column by changing it in the Name text field.
  7. Click Generate XML Schema.

Result: The database structure is converted to an XML Schema and it is opened for viewing and editing.