Document toolboxDocument toolbox

XPath

Description

This unit is a Processor type unit.

The XPath unit executes XPath queries against XML documents. The result is provided as a new XML document.

An event comes in through the in port. The expression specified in the properties is executed and the data field content is parsed.

Successfully parsed input events are enriched with a new field containing the xpath result, and the event is output through the out port.

If an error occurs, the input event is enriched with new fields describing the problem, and the event is sent through the error port.

Configuration

After dragging this unit into the Flow canvas, double-click it to access its configuration options. The following table describes the configuration options of this unit:

TabFieldDescription

General

NameEnter a name for the unit. It must start with a letter, and cannot contain spaces. Only letters, numbers, and underscores are allowed.
ExpressionEnter an XPath valid expression to determine the behavior of the unit.
Result typeThe type of the expected result. XML stands for XML String. Java stands for generic java types (Map, List, String, ...).
In fieldEnter the name of the input event field containing JSON data.
Out fieldEnter a name for the output event field containing the result.

Input ports

PortDescription
inEvents containing a properly formatted XML.

Output ports


PortDescription
out Outputs events enriched with an extra field containing the new XML.
errorSignals when an error occurred. Events are input events enriched with standard error fields.