response xml text is :
"<?xml version="1.0" encoding="UTF-8"?><MMP><MERCHANT><RESPONSE><url>http://XXXXXXx/asdasd/asdsd/as</url><param name="ttype">QEQW</param><param name="tempTxnId">155411</param><param name="token">v22mM1NmwpHCKLp%2FZJC%2B7PUKASXr2aS01JPi2ZXDqT0%3D</param><param name="txnStage">1</param></RESPONSE></MERCHANT></MMP>"
I want to parse this xml text in grails/groovy. How do I iterate through all the elements to fetch the data of a particular element?
You can use the XMLSlurper to read the xml.
Here is some example code for your posted xml: