Creating XML Elements

Tip: This section explains how to create a new, empty XML component. Youn can also create a new XML component by editing an existing XML component, duplicating it, and renaming the duplicate to the name that you want to use. See Editing XML Elements for more information about duplicating components.

To create a new XML element, click the Add icon () to the right of the XML entry in the left-hand navigation bar of the Watson™ Explorer Engine administration tool. A screen like that shown in Figure 1 displays.

Figure 1. Creating a New XML Element

In the Element field, enter the name of the XML element that you want to create. This name must be a valid XML element name, and must therefore begin with a letter, underscore, or colon followed by letters, digits, hyphens, underscores, colons, or periods (full stops). XML elements used in Watson Explorer Engine are the following: admin-options, application, dictionary, form, function, kb, macro, options (project), parser, report, source, syntax, and vse-collection.

After specifying the name of the element that you want to create, enter a name for this element in the Name field. This may only contain letters, digits, hyphens, underscores, colons, and periods. Click Add to create the new element. A screen like that shown in Figure 2 displays.

Figure 2. Editing an XML Element

After creating a new XML element, you are automatically in edit mode. You can either continue adding XML code to your new element or click OK at any time to exit edit mode and save the current contents of your new element. You element must be syntactically correct before you can save it -- you cannot save an XML element with in-progress changes that are not structurally correct.

Note: Elements of types that can be graphically edited in the Watson Explorer Engine administration tool will display an edit as type link on this page once they have been saved. These are the dictionary, form (input form), function (only display functions), kb (knowledge base), options (project), source, and vse-collection (collection) element types. Clicking this link will open that element in the associated portion of the Watson Explorer Engine administration tool.