Skip to content
DevTest Solutions - 10.2
Documentation powered by DocOps

XML XPath Filter

Last update November 14, 2016

The XML XPath filter lets you use an XPath query that runs on a property or the last response and stores it in a property. When this filter is selected, the last response is loaded into the content panel.

You can view the response as an XML document or as a DOM tree. However, the XPath selection can be made only from the DOM tree.

Construct the XPath query by using one of the following methods:

  • Manually enter the XPath expression in the XPath Query text box.
  • Select an element from the DOM tree and let DevTest construct the XPath expression.
  • Select an element from the DOM tree, and then edit the XPath that is constructed. For example, you can modify it to use a property, or a counter data set.

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 in this field. The property must exist.

  • Save To Property
    The property in which to store the result of the XPath query.

Now, you  construct the XPath query using one of the methods described previously.

After an XPath query has been constructed, test it by clicking Run Filter. The results of the query appear in the Filter Run Results pane.

The lisa.xml.xpath.computeXPath.alwaysUseLocalName property controls whether the XPath local-name() function is always used during the XPath generation. The default value is false, which means that the local-name() function is used only when necessary. To generate an XPath that works regardless of an XML node namespace, set the value to true.

Note: The DevTest XML XPath filter is based on the HTML DOM spec. That spec maintains that all DOM element names must be upper case, while attribute names must be lower case.

Was this helpful?

Please log in to post comments.