到%SUBJ%,我已经试过:Groovy - 如何在文档之间传输XML节点?
def xp = new XmlParser(); def testsuite = xp.parseText("<testsuite/>"); def testsuite1 = new XmlParser().parse("testsuite.xml"); testsuite1.testcase.each { testsuite.append(it); }
但是这给了我一个例外:
groovy.lang.MissingMethodException:法无签名:groovy.util.Node.append( )的参数类型是适用的:(groovy.util.Node)值:{测试用例...,...}
尽管:http://groovy.codehaus.org/api/groovy/util/Node.html 说:boolean append(Node child)
那么,如何复制/移动节点是补间文件? (在Groovy的方式 - 不使用W3D DOM/JDOM ...)
感谢, Ondra
注为自己 - kpiwko的解决方案是在[调用API不同(http://git.app.eng.bos.redhat.com/jbossqe-mobile.git/diff/sandbox/buildenv/build .gradle?id = 60feab865965f468957fcab31e453faa27fad731) – 2013-10-21 15:17:13