title: How to use XmlSlurper in soapUI
body: <p>I have the below groovy script which I run in groovyconsole and it runs just fine. I'm finding the number of child nodes for a particular node in my xml response and printing out required values for each child node.</p>
  
  <pre><code>def path = new XmlSlurper().parse(new File('C://SoapUI//ResponseXML/Response.xml'))
  NumberOfPositions =  path.Body.GetPositionsAggregateResponse.GetPositionsAggregateResult.AccountPositions.Securities.Positions.children().size()
  for(def i=0; i&lt;NumberOfPositions; i++){
  println i
  
  println  path.Body.GetPositionsAggregateResponse.GetPositionsAggregateResult.AccountPositions.Securities.Positions.PositionSummary[i].Legs[0].PositionAggregate[0].PositionID[0].text()
  println  path.Body.GetPositionsAggregateResponse.GetPositionsAggregateResult.AccountPositions.Securities.Positions.PositionSummary[i].Legs[0].PositionAggregate[0].AccountID[0].text()
  
  }
  </code></pre>
  
  <p>I want to perform the same task in soapUI, but couldn't get it working using groovyutils as mentioned here : <a href="http://www.soapui.org/Scripting-Properties/tips-a-tricks.html" rel="nofollow">http://www.soapui.org/Scripting-Properties/tips-a-tricks.html</a></p>
  
  <p>1) How do I parse the xml response from my request to xmlSlurper?
  def path = new XmlSlurper().parse (?)</p>
  
  <p>2) Would I be able to use the same code above in soapUI too?</p>
  
  <p>Any help is appreciated. Thanks!</p>