ak0032803
16 years agoContributor
How to Append node to xml
Hi ,
I have a testcase having follwoing scenario -
1-Test Request
2-Get response from test request append a node to response e.g
My response is
<Result>
<Tables>
<Table1>
<Name>
<Password>
</Table1>
<Table2>
<Name>
<Password>
</Table2>
</Tables>
<result>
Now I want to add a node of table in this xml so that my xml will look like
<Result>
<Tables>
<Table1>
<Name>
<Password>
</Table1>
<Table2>
<Name>
<Password>
</Table2>
<Table3>
<Name>
<Password>
</Table3>
</Tables>
<result>
3- Pass this generated xml to another request.
In addition to this the data I am adding to this is coming from data source .
I have tried to use property transfer step and able to get the reponse from first request in temporary property.
I am new to groovy script ..
Please let me know How can i solve this ?
I have a testcase having follwoing scenario -
1-Test Request
2-Get response from test request append a node to response e.g
My response is
<Result>
<Tables>
<Table1>
<Name>
<Password>
</Table1>
<Table2>
<Name>
<Password>
</Table2>
</Tables>
<result>
Now I want to add a node of table in this xml so that my xml will look like
<Result>
<Tables>
<Table1>
<Name>
<Password>
</Table1>
<Table2>
<Name>
<Password>
</Table2>
<Table3>
<Name>
<Password>
</Table3>
</Tables>
<result>
3- Pass this generated xml to another request.
In addition to this the data I am adding to this is coming from data source .
I have tried to use property transfer step and able to get the reponse from first request in temporary property.
I am new to groovy script ..
Please let me know How can i solve this ?