How to Define XML Value Sets

This task describes how to create value sets for XML parameters.

Value sets are arrays that contain a set of values. Using the Add Column and Duplicate Column buttons, you can create multiple value sets for your parameter and use them for different iterations.

When using value sets, the number of array elements per parameter does not have to be constant.

You can use optional elements that will appear in one value set, but not in another. This allows you to vary the values you send for each of the iterations—some iterations can include specific array elements, while other iterations exclude them.

To exclude an optional element, click the small triangle in the upper left corner of the cell and insure that it is not filled in.

In the following example, Set 1 and Set 2 use the optional elements: name, street, and state. Set 3 does not use a street name.

To set parameter element values

  1. View the Parameter Properties.

  2. If the Parameter Properties dialog box is not open, select Vuser > Parameter List and select the desired parameter. The dialog box shows a read-only view of the parameter values.

  3. Open the Data Parameterization box.

  4. Click the Edit Data button to open the Data Parameterization dialog box.

  5. Define value sets for the XML parameter.

  6. In the Set columns, insert values corresponding to the schema.

    If a row says NIL, it implies that the element is nillable. To include a value for the nillable element, enter the value as usual. To mark a value as nil, click the NIL icon to fill it in. This erases any value that you may have assigned to the element. In the following example, the city element is nillable, but it is only marked as nil in Set 2 and Set3—not in Set 1.

  7. Create additional value sets.

  8. To insert more value sets, click Add Column and insert another set of values in the new column. To copy an existing value set, select a row in the value set you want to copy and click Duplicate Column.

  9. Copy arrays.

  10. To duplicate an array element and its children, select the parent node and choose Duplicate Array Element from the right-click menu.

  11. Handle the <any> elements.

  12. For any type elements, right-click <any> in the Schema column and select one of the available options. These options may vary depending on the location of the cursor.

    • Add Array Element. Adds a sub-element under the root element.

    • Insert child. Adds a sub-element to the selected element.

    • Insert sibling. Adds a sub-element on the same level as the selected element.

    • Load XML. Loads the element values from an XML file.

    • Save XML. Saves the array as an XML file.

    • Copy XML. Copies the full XML of the selected element to the clipboard.

    Click the Rename text to provide a meaningful name for each array element.

  13. Remove unwanted columns.

  14. To remove a value set, select it and click Delete Column.

  15. Save the changes.

  16. Click Apply to save the changes and update the view in the Parameter Properties dialog box.

    Back to top