A.2 Managing XML Files

XML files can be managed through the toolbar icons or File menu options that the XML Editor provides, and a Document Type Definition (DTD) is required to create or add to XML files:

A.2.1 Understanding the XML Editor Toolbar

Table A-1 describes the XML Editor toolbar and menu options:

Table A-1 XML Editor Options



Returns focus to the element that was previously selected.

Select the parent of the currently selected element. Continue clicking to move up the hierarchy.

Select the top of the hierarchy.

Saves the XML file using the current name.

Undo any updates or modifications made on the hierarchy.

Cuts the selected text from the current XML file.

Copies the selected text into the current XML file.

Pastes the cut of copied text into the current XML file.

Adds a new element or text to the XML file.

File > Revert

Abandons all changes made in the current session and opens the saved version of the XML file.

File > Save

File > Save As

Saves the XML file currently loaded in the editor.

File > Exit

Closes the XML Editor.

A.2.2 Using the Document Type Definition (DTD)

The DTD is specified at the top of an XML file to specify the valid elements for the file. The DTD is identified using the DOCTYPE element, as shown in the following example:

<!DOCTYPE hierarchy
  PUBLIC "‑//Managed Object Solutions, Inc.//DTD hierarchy 2.0//EN"

All DTDs provided by Operations Center are located in the /OperationsCenter_install_path/database/examples directory.

If an XML file that does not contain a DTD is opened in the XML Editor, the following error message displays:

Figure A-2 Error Message: XML files with no DTD

It is possible to view and edit the XML file, but not to add items to it.

To select a DTD when creating an XML file:

  1. Click New on the toolbar.

    The XML Editor displays the following dialog box for selecting a DTD:

  2. Do one of the following:

    • Select a standard Operations Center DTD.

    • Click Browse, select a DTD from a different location, then click OK.

      Operations Center provides a DTD for algorithms, hierarchy, and View Builder XML files.

      The Enter a Public ID dialog box prompts for a public ID for the DTD.

    • Enter an ID.

      The ID entered here displays in the Select a DTD File dialog box when the New icon or File > New is selected:

      Enter a Public ID Dialog Box
  3. To skip creating a public ID, click None to open the Choose Root Element dialog box.

  4. Select a root element.

    The selected root element displays in the Element column:

  5. Click OK to display the DTD.