Creating an XML Definition Set

An XML definition set provides the output document definition for retrieving XML data over HTTP.

This section gives quick steps for creating an XML-type definition set. Quick steps for creating an XML definition set are given in this section. For more details, see refer to the User Guide, Chapter Definition Sets.

To create an XML-type definition set

Right-click at an appropriate location in the resource tree, and select New Definition Set.
1. Type a name for the definition set.
2. Select XML in the Type drop-down list.
3. Click OK.

The definition set is added to the resource tree, and the editor for the definition set opens in the right pane.

4. In the editor, select the XML Schema tab to define your XML schema. You can do this in one of three ways.
You can type your XML schema in this panel.
You can upload an existing XML schema by clicking the Import XML Schema Definitions From File(s) toolbar button, navigating to the file location, and selecting the XML schema file to import. To show or hide the connection properties and alternate location mappings, check or uncheck the Show Advanced Options box.
You can base your schema on an existing XML instance. Click the Create XML Schema Definitions from XML Instance toolbar button and navigate to the XML file. When you click Open, the XML file appears on the XML Schema panel of the editor.

Note: The XML instance should be an actual XML file, not a schema.

5. To format the definition set with hierarchical indentation, and with keywords in orange type and literal definitions in blue type, click the Format XML Schema Definitions toolbar button.
6. Click the Validate XML Schema Definitions toolbar button.

If the schema is valid, an information box appears with the message, The definition set is valid. If not, an error dialog box opens with a message describing the line and column where a problem was encountered.

Note: A field in the lower right corner of the XML Schema panel indicates the current line and column position of the cursor, separated by a colon; for example, 20:34 for line 20, column 34.

7. Save the new XML schema using Studio’s File > Save command.