Forum Discussion
omatzura
17 years agoSuper Contributor
Hi!
Try using GroovyUtils/XmlHolder to get the DOM node of the parent ("prod1:request"), and then use the DOMCategory to append the nodes.. something in the line of
Hope this helps!
regards,
/Ole
eviware.com
Try using GroovyUtils/XmlHolder to get the DOM node of the parent ("prod1:request"), and then use the DOMCategory to append the nodes.. something in the line of
import groovy.xml.dom.DOMCategory
import groovy.xml.QName
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
// get the xml to update
def holder = groovyUtils.getXmlHolder( "Request 1#Request" )
// get parent node for new child
def node = holder.getDomNode( "//prod1:request" )
// use DOMCategory to simplify things..
use( DOMCategory )
{
// add new "ProductServiceId" element with "?" value..
node.appendNode( new QName( "http://xyz.ca/ebusiness/ProductService", "ProductServiceId", "prod1"), "?" ) }
holder.updateProperty()
Hope this helps!
regards,
/Ole
eviware.com
Related Content
- 10 years ago
Recent Discussions
- 15 years ago