Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Nifi:Checking if content contains xml tag


Nifi:Checking if content contains xml tag

I want to use routeonContent and put my response in deifferenct directories based on the method names they consist i have attribute '$message.body' and use expression( in routeonContent) ${message.body:contains('<person>')} . But it doesn't work for me do you have any better idea how can i do this?

I need to check if it conatains tag with name person and if it does o will route it to certian direction

Re: Nifi:Checking if content contains xml tag

You could use the EvaluateXPath processor to check for the presence of specific elements in your XML. Use a Destination of flowfile-attribute to create a dynamic attribute for your tag value, then use RouteOnAttribute and check if the value is empty.

Don't have an account?
Coming from Hortonworks? Activate your account here