title: how to check condition in xml response in jmeter
body: <p>In jmeter ,In a xml response with multiple same name's tag, I want to validate that in case value of tag onlineFulfilmentFlag is Y ,then productId should not be blank.In case of failure of above  condition , I want to print a failure message as" INVALID PRODUCT ID" .I am also attaching  the response .This code contain description of 1 offer ,but this number can vary from 0-10.</p>
  
  <pre><code>enter code here&lt;offers&gt;
         &lt;number xsi:nil="true"/&gt;
         &lt;number&gt;
            &lt;amrit&gt;S&lt;/amrit&gt;
            &lt;interestedFlag&gt;Y&lt;/interestedFlag&gt;
            &lt;msgid&gt;145983&lt;/msgid&gt;
            &lt;msisdn xsi:nil="true"/&gt;                 
            &lt;offerIndex&gt;1&lt;/offerIndex&gt;
            &lt;msgtext&gt;Rs115=225 &lt;/msgtext&gt;
            &lt;onlineFulfilmentFlag&gt;Y&lt;/onlineFulfilmentFlag&gt;
            &lt;orderId xsi:nil="true"/&gt;
            &lt;otherSearchInfo&gt;
               &lt;number&gt;
                  &lt;key&gt;START_DATE&lt;/key&gt;
                  &lt;value&gt;2016-09-16 11:28:46.921455&lt;/value&gt;
               &lt;/number&gt;
               &lt;number&gt;
                  &lt;key&gt;END_DATE&lt;/key&gt;
                  &lt;value&gt;2017-08-03 00:00:00.0&lt;/value&gt;
               &lt;/number&gt;
               &lt;number&gt;
                  &lt;key&gt;OFFER_CATEGORY&lt;/key&gt;
                  &lt;value&gt;Others&lt;/value&gt;
               &lt;/number&gt;
            &lt;/otherSearchInfo&gt;
            &lt;price&gt;115&lt;/price&gt;
            &lt;productId&gt;ACT3G&lt;/productId&gt;
            &lt;shortDesc&gt;115=225Loc+STD M,28D&lt;/shortDesc&gt;
            &lt;subscriptionStatus&gt;P&lt;/subscriptionStatus&gt;
         &lt;/number&gt;
         &lt;number&gt;
            &lt;amrit&gt;O&lt;/amrit&gt;
            &lt;interestedFlag&gt;Y&lt;/interestedFlag&gt;
            &lt;msgid&gt;143429&lt;/msgid&gt;
            &lt;msisdn xsi:nil="true"/&gt;
            &lt;msgid&gt;2803708&lt;/msgid&gt;
            &lt;offerIndex&gt;2&lt;/offerIndex&gt;
            &lt;msgtext&gt;Rs306=Rs306 Full&lt;/msgtext&gt;
            &lt;onlineFulfilmentFlag&gt;Y&lt;/onlineFulfilmentFlag&gt;
            &lt;orderId xsi:nil="true"/&gt;
            &lt;otherSearchInfo&gt;
               &lt;number&gt;
                  &lt;key&gt;START_DATE&lt;/key&gt;
                  &lt;value&gt;2016-09-16 11:28:46.921455&lt;/value&gt;
               &lt;/number&gt;
               &lt;number&gt;
                  &lt;key&gt;END_DATE&lt;/key&gt;
                  &lt;value&gt;2017-08-03 00:00:00.0&lt;/value&gt;
               &lt;/number&gt;
               &lt;number&gt;
                  &lt;key&gt;OFFER_CATEGORY&lt;/key&gt;
                  &lt;value&gt;Combo&lt;/value&gt;
               &lt;/number&gt;
            &lt;/otherSearchInfo&gt;
            &lt;price&gt;306&lt;/price&gt;
            &lt;productId&gt;ACT3G&lt;/productId&gt;
            &lt;shortDesc&gt;Rs306=306TT(Ultd Val)&lt;/shortDesc&gt;
            &lt;subscriptionStatus&gt;P&lt;/subscriptionStatus&gt;
         &lt;/number&gt;
         &lt;number&gt;
            &lt;amrit&gt;O&lt;/amrit&gt;
            &lt;interestedFlag&gt;Y&lt;/interestedFlag&gt;
            &lt;msgid&gt;145022&lt;/msgid&gt;
            &lt;msisdn xsi:nil="true"/&gt;
            &lt;msgid&gt;2800482&lt;/msgid&gt;
            &lt;msgtext&gt;Rs110=Rs110 Full&lt;/msgtext&gt;
            &lt;onlineFulfilmentFlag&gt;Y&lt;/onlineFulfilmentFlag&gt;
            &lt;orderId xsi:nil="true"/&gt;
            &lt;otherSearchInfo&gt;
               &lt;number&gt;
                  &lt;key&gt;START_DATE&lt;/key&gt;
                  &lt;value&gt;2016-09-16 11:28:46.921455&lt;/value&gt;
               &lt;/number&gt;
               &lt;number&gt;
                  &lt;key&gt;END_DATE&lt;/key&gt;
                  &lt;value&gt;2017-08-03 00:00:00.0&lt;/value&gt;
               &lt;/number&gt;
               &lt;number&gt;
                  &lt;key&gt;OFFER_CATEGORY&lt;/key&gt;
                  &lt;value&gt;Others&lt;/value&gt;
               &lt;/number&gt;
            &lt;/otherSearchInfo&gt;
            &lt;price&gt;110&lt;/price&gt;
            &lt;productId&gt;ACT3G&lt;/productId&gt;
            &lt;shortDesc&gt;Rs110=Rs110 FTT, ULTD&lt;/shortDesc&gt;
            &lt;subscriptionStatus&gt;P&lt;/subscriptionStatus&gt;
         &lt;/number&gt;
  </code></pre>