nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christof Dilcher (JIRA)" <>
Subject [jira] [Commented] (NIFI-5567) EvaluateXPath processor produces empty string sets for valid XPaths
Date Tue, 04 Sep 2018 07:39:00 GMT


Christof Dilcher commented on NIFI-5567:

Hi [~alopresto],

thanks for the quick reply! I think the reason for this behavior are the namespaces used.
I have attached a template ([^EvaluateXPath_Test_template.xml]) with an example that shows
this. From the template description:

"A test that shows the behavior of the EvaluateXPath processor when the xml that is to be
processed contains namespaces or not. The following namespaces are used.
xmlns="" xmlns:vc=""

If the namespaces are in place EvaluateXPath does not find the configured XPath. As soon as
the namespaces are removed from the xml the XPath is found."

What would be the correct way to handle namespaces so EvaluateXPath works correctly? I have
found NIFI-1023, but the way described there does not work, at least not with the nifi-1.7.1.
release that I use.

Is it possible to set namespaces in the EvaluateXPath processor or in the FlowFile?





> EvaluateXPath processor produces empty string sets for valid XPaths
> -------------------------------------------------------------------
>                 Key: NIFI-5567
>                 URL:
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.7.1
>            Reporter: Christof Dilcher
>            Priority: Major
>              Labels: XPath, xml
>         Attachments: EvaluateXPath_ExampleXML_empty_string_set.xml, EvaluateXPath_FlowFile_Attributes_empty_string_set.png,
EvaluateXPath_ProcessorConfiguration_empty_string_set.png, EvaluateXPath_Template.png, EvaluateXPath_Template_empty_string_set.xml,
> I have found that valid XPath expressions apparently produce empty strings in EvaluateXPath
processor which can be observed in the attached screenshots. I am using nifi 1.7.1 and jdk1.8.0_181.jdk.
Any help would be appreciated!
> The source of the XML files is a GetFile Processor or a GenrateFlowFile Processor.
> I have also tested it with an InvokeHTTP processor where it works fine. However this
does not solve it for me as I am dealing with physical XML files here. However this little
detail might be interesting for the error finding process.

This message was sent by Atlassian JIRA

View raw message