IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Building mediation flows > Create XPath expressions

Use the XPath Expression Builder

The XPath expression builder allows you to easily create simple or complex XPath 1.0 expressions.

The XPath Expression Builder can be accessed from a number of mediation flow primitives. To access the expression builder, click the Edit... button in the primitive's details properties view.

To use the XPath expression builder:


Procedure

  1. Create a mediation flow, add primitives and wire them as needed.
  2. Right click the primitive you want to add an XPath expression to and select Show in properties.

  3. Click Details, then click the Edit... button.

  4. The Simple XPath Expression builder now appears.
  5. Expand the Data Types tree and navigate to the field for which you want to build an expression. A field is either an element or an attribute. Attributes are shown with a preceding @ character in the name. Repeating fields are shown with brackets []. As you interact with the builder, the resulting expression is displayed in the Expression box. If you simply want to return the value of the field, you can click OK.

  6. Optional : Apply a filter on a repeatable field by using the optional filter table. See Example: Setting filters in Xpath expressions.

  7. Optional: Add a condition on a field to evaluate an expression on a field, by using the optional conditions table. See Example: Using conditions in XPath expressions.


Results

If : Not all primitives which have an Edit... button in their properties pages call the XPath Expression Builder.

For example, the Business Object Map primitive and the XSL Transform primitive call the business object map editor and XML map editor when the Edit... button is pushed.

If you are in a field which accepts an XPath expression, you can press Control+Space to get code-assist. This will provide you with available XPath functions and operators for your expression. For more information about using XPath 1.0 see the following websites:

Create XPath expressions