Forum Discussion
Hello Kondasamy,
Thank you for your response, I get the idea that I can use holder.getNodeValues("//document-group") to retrieve all the document-group in the XML, but how would i go about retrieve just the <document-group> that are within the <available-document> ? the reason is that I will have multiple <available-document> and the number of time it appears in the response will change, now the idea is to iterate through all the <available-document> in the XML and in each <available document> i would like to iterate through the XML and retrieve the <document-group> that are in it. I wasnt having any solution on how would I go about nested iteration.
Thank you
You can check XMLSlurper,
http://docs.groovy-lang.org/latest/html/api/groovy/util/XmlSlurper.html
Thanks