Description:
This processor evaluates one or more XPaths against the content
of FlowFiles. The results of those XPaths are assigned to FlowFile
attributes or are written to the content of the FlowFile itself,
depending on how the user configures the Destination and Return Type properties in the
processor. XPaths are entered by adding user-defined properties; the
name of each user-added property maps to the attribute name into
which the result should be placed. The value of the property must be
a valid XPath expression.
Properties:
In the list below, the names of required properties appear in bold.
Any other properties (not in bold) are considered optional. If a
property has a default value, it is indicated. If a property
supports the use of the NiFi Expression Language (or simply,
"expression language"), that is also indicated.
Modifies Attributes:
This processor adds user-defined attributes if the <Destination> property is set to
flowfile-attribute
.
-
Destination
- Indicates whether the results of the XPath evaluation are
written to the FlowFile content or a FlowFile attribute; if using
attribute, the attribute's name must be specified in the value of
the Attribute Name property.
-
Valid values are:
- flowfile-content
- flowfile-attribute
- Default value: flowfile-content
- Supports expression language: false
-
Return Type
- Indicates the desired return type of the Xpath expressions.
Selecting 'auto-detect' will set the return type to 'nodeset' for a
Destination of 'flowfile-content', and 'string' for a Destination of
'flowfile-attribute'.")
-
Valid values are:
- auto-detect
- nodeset
- string
- Default value: auto-detect
- Supports expression language: false
-
user-defined properties
- The name of the attribute to put the XPath result into if
flowfile-attribute is used as the value for the Destination
property; if using flowfile-content as the value for the
Destination property, this value is ignored.
- Supports expression language: false
Relationships:
-
failure
- If the XPath cannot be evaluated against the content of the
FlowFile, then the FlowFile follows this relationship. For
example, if the FlowFile does not contain valid XML.
-
matched
- If the XPath is successfully evaluated and the FlowFile is
modified as a result, then the FlowFile follows this
relationship.
-
unmatched
- If the XPath does not match the content of the FlowFile, then
the FlowFile follows this relationship.