How do I get rid of xsi:nil when setting an elements text using groovy
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2015
01:13 PM
09-18-2015
01:13 PM
How do I get rid of xsi:nil when setting an elements text using groovy
I'm trying to set the text of an xml element in my request that was previously set to xml:nil=true.
So I want:
<MyElement i:nil="true" />
to become:
<MyElement>NewText</MyElement>
My groovy script is:
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context ) def response = groovyUtils.getXmlHolder("Step1#Response") response["//MyElement"] = "NewText"
But I'm getting:
<MyElement i:nil="true">NewText</MyElement>
How do I get rid of the xsi:nil attribute?
Solved! Go to Solution.
2 REPLIES 2
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2015
03:15 AM
10-08-2015
03:15 AM
Would you like to post the full xml? Can you also clarify how your test case is structured and what you wanted to achieve?
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2015
05:04 AM
10-08-2015
05:04 AM
See the answer on StackOverflow at http://stackoverflow.com/questions/32660818/using-groovy-in-soapui-to-set-the-text-for-an-xml-elemen...
