Forum Discussion
M_McDonald
14 years agoSuper Contributor
A CDATA section hides it's content from any XML parser, so you need an intermediate step to get the NewDataSet XML. If you put the following in a Groovy script step
the step will return
Then you can point to the Groovy step as the source for your PropertyTransfer.
def gu = new com.eviware.soapui.support.GroovyUtils( context )
def responseAsXml = context.expand( '${MyRequest#ResponseAsXml}' )
def holder = gu.getXmlHolder( responseAsXml )
holder.namespaces["ns"] = "http://www.webserviceX.NET"
return holder.getNodeValue( "//ns:GetCountriesResult[1]" )
the step will return
<NewDataSet>
<Table>
<Name>Afghanistan, Islamic State of</Name>
</Table>
<Table>
<Name>Albania</Name>
</Table>
<Table>
<Name>Algeria</Name>
</Table>
<Table>
<Name>American Samoa</Name>
</Table>
</NewDataSet>
Then you can point to the Groovy step as the source for your PropertyTransfer.
//NewDataSet[1]/Table[1]/Name[1]