Exporting data as XML

You can select one or more objects and export them to a readable XML file or directly to another server. By exporting data as XML, you can transfer IBM® Content Manager metadata, including data model objects, such as item types and their attributes, and administration objects, such as server definitions and access control lists, from one IBM Content Manager system to another.

About this task

You can export objects with their prerequisites. Each metadata object has a set of attributes. Some of these attributes might be other IBM Content Manager objects. These other objects are considered prerequisite, or dependent, objects.

Restriction: For a single export action, you cannot select objects of different types. For example, you cannot select to export some item types and some access control lists in the same export action. You can export these objects in two separate export actions.
Restriction: There are characters used for the name of a data model object for IBM Content Manager that are not valid in the XML context. For example, XML does not allow "XML" to be at the beginning of an element or attribute name. Therefore, an item type name, "XMLDocument" cannot be directly mapped to an element name in XML. Another example is that the XML name does not allow spaces. To find a list of valid characters in XML, see the XML standard, http://www.w3.org/TR/REC-xml#NT-Name.

Exported files contain import statements that refer to IBM Content Manager schema files. These files are specific to your IBM Content Manager installation; they are in the IBMCMROOT\config directory. If you are using XML Services in IBM Content Manager administration, no action is necessary. If you want to load an exported file into a different tool, such as an XML editor, specify the location of IBMCMROOT\config\cmdatamodel.xsd. On Windows, the default location of IBMCMROOT is C:\Program Files\IBM\db2cmv8. On Linux® and AIX®, it is /opt/IBM/db2cmv8.

To export data, complete the following steps:

Procedure

  1. In the navigation pane, select the object you want to export.
    If the item type you plan to export has a Db2® Net Search Extender index enabled on an attribute, then ensure you restart the system administration client first to avoid exporting the wrong index.
  2. If you selected one or more container objects of the same type, right-click, and then click Export to XML. If you selected a single tree node, right-click, and then click Export All to XML.
    The Export Options window opens.
  3. Under Dependent definitions to also export, select any dependent objects that you want to export. For example, if you are exporting an item type, it might have a dependency on an access control list or an attribute group. So for this example, you can select Data model definitions or Administrative definitions.
  4. Under Export destination, you can export your metadata to a file or to another server:
    Option Description
    To file Go to the directory you want to store the file, and then enter a file name.

    The file containing data model objects has a file extension of .xsd. A file containing administrative objects has an extension of .xml.

    You can import the file after it is created to another system using the Tools > Import XML command.

    Note: Importing an XML file to create an item type, even with a successful action, might result in one of the following error messages being displayed in the DK log file:
    • DGL0690A: No matching method and parameters
    • DGL3898A: Component type ID does not exit

    The error messages in this case are the result of the logical flow of creating an item type and component type object that has not yet been added to the database. Therefore, these error messages can be ignored.

    Directly to another server Select the server name from the list, and then select one of the following:
    • To watch the export progress and see the results, select Process interactively.
    • To let the process run in the background and view the results in a log file, select Process in background and log results. If an error occurs it is logged, and processing continues with the next object.
  5. Click OK.

What to do next

To properly import a particular object, all of the prerequisite objects have to either exist or be already imported to the system. To guarantee that this action occurs, the export order is important. When you choose to export an object with the prerequisite option on, the proper order is ensured. However, IBM Content Manager cannot handle the situation where there is a cyclic dependency among objects of the same type.

For example, there are three item types: A, B and C. Here is how they are related to each other:
  • Item Type A depends on Item Type B (because of a foreign key definition)
  • Item Type B depends on Item Type C (because of an auto foldering definition)
  • Item Type C depends on Item Type A (because of a foreign key definition)

A warning message is logged in the connector log file and is displayed in the system administration client when this situation is detected during XML export. The message in the log file describes where the cycle is. In the example, the following log message is found in the log file: [MSG]: There is a cycle ([A, B, C]) within the dependent objects of A of type ITEM TYPE. When import the definitions to another system, please remove the cycle before import the XML document.

To avoid this problem, complete the following steps:
  1. Make a copy of the exported XML file.
  2. Break the cycle in the XML file. In the example, remove the foreign key definition temporarily from C to A in the XML export file.
  3. Import the modified XML file.
  4. Add the removed definition back to the XML file. In the example, it is the foreign key definition from C to A.
  5. Import only the objects being affected. In the example, it is the item type C.

During the export process, the real password of a system administration object, such as a user, is not exported. The default text password is used instead. This feature is introduced for security reasons. There should not be any real password in clear text written in the export file.

The following system administration object passwords are exported as password:

  • password for user
  • password in the resource manager server definition (CMResourceManagerDefinitions)
  • resource manager password in the resource manager configuration definition
  • Db2 Text Information Extender or Db2 Net Search Extender password for the library server configuration.

When the export process is finished, each of these objects has password as the password.

If you want to import the exported object back to the database, change the default password in the exported file before importing it. Otherwise, the default password (password) is imported into the target system. This rule applies to all the system administration objects that have password fields.

Because the exported password is always the default text password, while importing in interactive mode, the comparison is based on the target system having the default password also. Even though the passwords in the source object and target system object are the same, the conflict might still arise.