XML : Check node exists in XML using a Choice in Mule

I am using a choice component in Mule 3.7.3 which will follow one flow if the XML contains an node called user.

I continue to get errors using different variations of syntax. Does anyone know how I can test that the XML contains the user node?

Choice code:

  <choice doc:name="Check to send confirmation">      <when expression="#[xpath:boolean(/user/text()[1])==&quot;true&quot;]">      </when>      <otherwise>          <logger message="#['Error creating user - Confirmation not sent']" level="INFO" doc:name="Logger"/>      </otherwise>  </choice>    

Thanks

No comments:

Post a Comment