title: Get text value from xml in soapui groovy script
body: <p>My task is get value from xml in soapui to create next test in a sequence.</p>
  
  <p>I use groovy script</p>
  
  <p>My target is get text inside  tag. It's easy to recognize becouse it's base64 encoded string.</p>
  
  <pre><code>def project = testRunner.testCase.testSuite.project ;
  def tcase = project.testSuites["ChangeRetentionByCopyDemoSuite"].testCases["Milestone2"] ; 
  def tstep = tcase.getTestStepByName("getDocuments - GetContentURLRequest");
  
  def responseTestSuite1 = tstep.getPropertyValue("response");
  
  log.info(responseTestSuite1.toString());
  
  def gutils = new com.eviware.soapui.support.GroovyUtils( context );
  def holder = gutils.getXmlHolder("$responseTestSuite1");
  
  def byteResponse = holder.getNodeValue("/S:Envelope/S:Body/g:getDocumentsResponse/text()");
  </code></pre>
  
  <p>log.info(byteResponse);</p>
  
  <p>The xml responce in <strong>getDocuments - GetContentURLRequest</strong></p>
  
  <blockquote>
  <pre><code>    &lt;S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"&gt;
     &lt;S:Header&gt;
        &lt;Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"&gt;
           &lt;Timestamp xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"&gt;
              &lt;Created&gt;2015-09-15T13:57:50.844Z&lt;/Created&gt;
              &lt;Expires&gt;2015-09-16T13:57:50.844Z&lt;/Expires&gt;
           &lt;/Timestamp&gt;
        &lt;/Security&gt;
     &lt;/S:Header&gt;
     &lt;S:Body&gt;
        &lt;getDocumentsResponse xmlns="http://asg.com/2009/03/schemas/tciadapters/getdocument"&gt;
           &lt;result&gt;
              &lt;operationStatus&gt;
                 &lt;severity&gt;INFO&lt;/severity&gt;
                 &lt;reasonCode&gt;A300&lt;/reasonCode&gt;
                 &lt;messageText&gt;All requests completed without errors.&lt;/messageText&gt;
              &lt;/operationStatus&gt;
              &lt;documents&gt;
                 &lt;DocumentData&gt;
                    &lt;docId&gt;
                       &lt;NameValuePair&gt;
                          &lt;keyName&gt;cmis:objectId&lt;/keyName&gt;
                          &lt;keyValue&gt;idd_48716F01-F5F7-4702-AC80-4EC70C949121&lt;/keyValue&gt;
                       &lt;/NameValuePair&gt;
                    &lt;/docId&gt;
                    &lt;status xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/&gt;
                    &lt;content&gt;
                       &lt;ContentSegment&gt;
                          &lt;data&gt;aHR0cHM6Ly91c3J5ZTh0Y2k0bTAyLmFzZy5jb206NzQ0My9jbWlzYWRhcHRlci9nZXRjb250ZW50P3VzZXJpZD1kZXY2ZGV2aWQmcGFzc3dvcmQ9ZGV2ZWxvcCUyMzEmY21pc19pbnN0YW5jZT1GaWxlTmV0UDgrLStBdG9tUHViJnJlcG9zaXRvcnk9ZmlsZW5ldG9iamVjdHN0b3JlMSZjbWlzOm9iamVjdElkPWlkZF80ODcxNkYwMS1GNUY3LTQ3MDItQUM4MC00RUM3MEM5NDkxMjE=&lt;/data&gt;
                       &lt;/ContentSegment&gt;
                    &lt;/content&gt;
                    &lt;metadata/&gt;
                    &lt;properties&gt;
                       &lt;subrange xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/&gt;
                       &lt;format xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/&gt;
                       &lt;supportedFormats/&gt;
                    &lt;/properties&gt;
                    &lt;retention/&gt;
                 &lt;/DocumentData&gt;
              &lt;/documents&gt;
           &lt;/result&gt;
        &lt;/getDocumentsResponse&gt;
     &lt;/S:Body&gt;
  &lt;/S:Envelope&gt;
  </code></pre>
  </blockquote>
  
  <p>Unfortunately I got exception when run last line of code</p>