You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by claudiu-stanciu <cl...@gmail.com> on 2017/07/14 10:51:21 UTC

Expression language support in EvaluateXPath

Hello,

I saw that  EvaluateXPath declares that expression language is not supported
<https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateXPath.java#L209>  

My question is: can we have support for expression language with XPath ?
(I'm not an expression language or xpath expert :) ).

This would be nice when you want to pass the xpath from a content or an
attribute.

Thank you



--
View this message in context: http://apache-nifi-developer-list.39713.n7.nabble.com/Expression-language-support-in-EvaluateXPath-tp16441.html
Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.

Re: Expression language support in EvaluateXPath

Posted by claudiu-stanciu <cl...@gmail.com>.
Hi,

Thanks for your feedback.

I created a Jira task https://issues.apache.org/jira/browse/NIFI-4190. Maybe
I'll find time to work on it.

Cheers,
Claudiu



--
View this message in context: http://apache-nifi-developer-list.39713.n7.nabble.com/Expression-language-support-in-EvaluateXPath-tp16441p16446.html
Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.

Re: Expression language support in EvaluateXPath

Posted by Mark Payne <ma...@hotmail.com>.
Hello,

In glancing at the processor I believe the reason that the Expression Language is not supported is due to efficiency purposes.
The processor grabs up to 50 FlowFiles, then compiles the XPath Expressions and runs them over all 50 FlowFiles. If we
did support Expression Language and EL were used, we would have to re-compile the XPath Expression for every FlowFile.
That said, there's no reason we can't do that. However, in order to avoid hurting performance when not necessary it would need
to contain a bit of logic to pre-compile the expressions that aren't configured with Expression Language, so it's not a trivial change.
If you're interested in updating the Processor, though, I'd be happy to review it.

Thanks
-Mark



> On Jul 14, 2017, at 6:51 AM, claudiu-stanciu <cl...@gmail.com> wrote:
> 
> Hello,
> 
> I saw that  EvaluateXPath declares that expression language is not supported
> <https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EvaluateXPath.java#L209>  
> 
> My question is: can we have support for expression language with XPath ?
> (I'm not an expression language or xpath expert :) ).
> 
> This would be nice when you want to pass the xpath from a content or an
> attribute.
> 
> Thank you
> 
> 
> 
> --
> View this message in context: http://apache-nifi-developer-list.39713.n7.nabble.com/Expression-language-support-in-EvaluateXPath-tp16441.html
> Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.