I need to remove soap envelope from soap message. For that I want to use XSLT, not java. It would be more proper solution for operating such type of xml.
For e.g. I have a soap message:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tar="namespace"
xmlns:tar1="namespace">
<soapenv:Header/>
<soapenv:Body>
<tar:RegisterUser>
<tar1:Source>?</tar1:Source>
<tar1:Profile>
<tar1:EmailAddress>?</tar1:EmailAddress>
</tar1:Profile>
</tar:RegisterUser>
</soapenv:Body>
</soapenv:Envelope>
And I want my output to be something like this:
<tar:RegisterUser xmlns:tar="namespace" xmlns:tar1="namespace">
<tar1:Source>?</tar1:Source>
<tar1:Profile>
<tar1:EmailAddress>?</tar1:EmailAddress>
</tar1:Profile>
</tar:RegisterUser>
Can someone provide me with some ideas on how to do this?
This gets rid of the
soapenv:
elements and the namespace declaration.Result:
Output:
Unfortunately, I could not find any easy way to remove the
xmlns:soapenv
attribute.