Forum Discussion
deepesh_jain
14 years agoFrequent Contributor
Hi Amit,
What you can do is get the xml in xml holder and check for the count of the tag in question. In case the count is 0, you can set desired property as 0. Here is how:
Let me know if this helps.
Regards,
Deeepsh Jain
What you can do is get the xml in xml holder and check for the count of the tag in question. In case the count is 0, you can set desired property as 0. Here is how:
def groovyUtils1 = new GroovyUtils (context) ;
def holder = groovyUtils1.getXmlHolder("<Step_Name>#Response") ;
def tagCount = holder["count(//Results[1]/ResultSet[1]/Row[FROM="66850117700" and TO="66860111111"]/number(SUM))"];
if (tagCount == 0)
{
//set desired property as 0
}
Let me know if this helps.
Regards,
Deeepsh Jain