Previous Topic: XML FiltersNext Topic: Read Attribute from XML Tag


Parse Text from XML

The Parse Text from XML filter stores the child text of a tag in a property. To define a Parse text from XML filter, set the type of the filter and set the three attributes.

You can create this filter either manually from the filter list or by using the embedded filter commands on an XML response.

To create the filter manually:

Complete the following fields:

Filter in

The name of the property to consider as the last response for the step. If the property is not in the pull-down menu, you can enter it. The property must exist. You can edit this value for this filter.

Tag

The type of the tag. For example, if you want the child text of the multiRef tag, enter "multiRef".

Tag Count

The occurrence of the tag. For example, if you want the child text of the first multiRef tag, set the count to "1".

Property

The property in which to store the value.

Filter Run Results

Displays the property and values that result from running the filter.

Run Filter

To run and execute the filter, click Run Filter. The results appear in the Filter Run Results section.

To create the filter directly from the response page:

Filter: Parse Text as XML filter, created directly from the response page example

  1. From the DOM Tree view, select the attribute whose value you want to store in a property.
  2. After it is selected, select Generate Filter for Attribute or Text.
  3. Enter the property name in the dialog.

    Filter: Parse Text as XML, Enter property key dialog

Assertions can also be added here.