AnsweredAssumed Answered

How to get count of all child tags of an XML file usings groovy scripting ?

Question asked by arijit.chandra573037 on Mar 23, 2018

How to get count of all child tags of an XML file usings groovy scripting ? also please let me know if any jar needs to be imported for this purpose?

 

Sample xml structure:

<?xml version="1.0" encoding="UTF-8"?>
<request>
   <IV_VKONT1>A </IV_VKONT1>
   <IV_VKONT2>B </IV_VKONT2>
   <IV_VKONT3>C </IV_VKONT3>
   <IV_VKONT4>D </IV_VKONT4>
</request>

 

count should be 4.

Outcomes