我需要从肥皂信息中删除肥皂信封.为此,我想使用XSLT,而不是java.对于操作这种类型的xml来说,这将是更合适的解决方案.
例如,我有一个肥皂消息:
<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>
Run Code Online (Sandbox Code Playgroud)
我希望我的输出是这样的:
<tar:RegisterUser xmlns:tar="namespace" xmlns:tar1="namespace">
<tar1:Source>?</tar1:Source>
<tar1:Profile>
<tar1:EmailAddress>?</tar1:EmailAddress>
</tar1:Profile>
</tar:RegisterUser>
Run Code Online (Sandbox Code Playgroud)
有人可以提供一些关于如何做到这一点的想法吗?