Ask a Question

How to write tag names and their corresponding values to excel using groovy script in free version?

sandy33
Visitor

How to write tag names and their corresponding values to excel using groovy script in free version?

I am a newbie to the SOAP and currently using free version of SOAP UI.

I want to write the Tag names and their corresponding values from a SOAP response to the external Excel file using groovy script. Consider for example I have a response like:

<SOAP env>

<Namespaces...>

<Root>

   <Data>

       <name>xyz</name>

       <sal>1000</sal>

   </Data>

   <Desig>

      <Current>ACO</Current>

      <Past>DCO</Past>

   </Desig>

</Root>

 

Now I want to  write only the child tags and their values to the excel and not the other tags those did not contain actual values.Will it be possible? Please guide on this.

 

Thanks in advance.

 

1 REPLY 1
sanj
Super Contributor

Writing to excel using groovy

You will have to use apache poi

 

https://gist.github.com/timyates/5583967

 

also you can look up use the following to determine how to parse out xml using groovy

http://groovy-lang.org/processing-xml.html

 

cancel
Showing results for 
Search instead for 
Did you mean: