EvaluateXQuery 2025.10.2.19

捆绑包

org.apache.nifi | nifi-standard-nar

描述

Evaluates one or more XQueries against the content of a FlowFile. The results of those XQueries are assigned to FlowFile Attributes or are written to the content of the FlowFile itself, depending on configuration of the Processor. XQueries are entered by adding user-defined properties; the name of the property maps to the Attribute Name into which the result will be placed (if the Destination is 'flowfile-attribute'; otherwise, the property name is ignored). The value of the property must be a valid XQuery. If the XQuery returns more than one result, new attributes or FlowFiles (for Destinations of 'flowfile-attribute' or 'flowfile-content' respectively) will be created for each result (attributes will have a '.n' one-up number appended to the specified attribute name). If any provided XQuery returns a result, the FlowFile(s) will be routed to 'matched'. If no provided XQuery returns a result, the FlowFile will be routed to 'unmatched'. If the Destination is 'flowfile-attribute' and the XQueries matche nothing, no attributes will be applied to the FlowFile.

标签

XML、XPath、XQuery、evaluate

输入要求

REQUIRED

支持敏感的动态属性

false

属性

属性

描述

目标

Indicates whether the results of the XQuery evaluation are written to the FlowFile content or a FlowFile attribute. If set to <flowfile-content>, only one XQuery may be specified and the property name is ignored. If set to <flowfile-attribute> and the XQuery returns more than one result, multiple attributes will be added to theFlowFile, each named with a '.n' one-up number appended to the specified attribute name

输出:缩进

指定处理器在输出结果树时是否可以添加额外的空白。

输出:方法

确定应用于输出结果树的总体方法。

输出:省略 XML 声明

指定处理器在转换结果树时是否应输出 XML 声明。

验证 DTD

允许在 XML 中嵌入文档类型声明。应禁用此功能以避免 XML 实体扩展漏洞。

关系

名称

描述

failure

当 XQuery 无法根据 FlowFile 的内容进行评估时,FlowFiles 将路由到此关系。

matched

成功评估 XQuery 且 FlowFile 因此被修改后,FlowFiles 将路由到此关系

unmatched

当 XQuery 与 FlowFile 的内容不匹配且目标设置为“flowfile-content”时,FlowFiles 将路由到此关系

写入属性

名称

描述

user-defined

如果 <Destination> 属性设置为 flowfile-attribute,则该处理器会添加用户定义的属性。

语言: 中文