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

How to check if xml element is exist or not in Nifi?

Highlighted

How to check if xml element is exist or not in Nifi?

Contributor

I have XML data like this;

<All>
  <Header creationTime="2019-02-04T17:10:53Z"/>
  <Specific>
    <New>
.....
</New>
</Specific> </All>

But sometimes, XML is coming like this;
<All>
  <Header creationTime="2019-02-04T17:10:53Z"/>
  <Specific/>
</All>


I want to check that if received XML contains "<Specific/>" .

How can I do that?