<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://someuri/">
<soapenv:Header/>
<soap:Body>
<Element>
///
</Element>
<Element>
///
</Element>
</soap:Body>
</soap:Envelope>
Hello
i need to change the uri in [xmlns:api="http://someuri/"] in the envelope element to "someotheruri" with a GroovyScript.
I searched for hours how to use xmlslurper, xmlparser and every node would be easily changeable. But i need to change this namespace that is in the rootelement.
def source = new File("test.xml").text
def root = new XmlSlurper(false, false).parseText(source)
println(root.lookupNamespace("api"))
It give me the uri as a String but not the node of it. Do i missing something?
It is really late and now my last hope is to ask here.
Thanks in advance!