Support Questions
Find answers, ask questions, and share your expertise

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

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.

; ;