相关疑难解决方法(0)

XSLT删除SOAP信封但保留名称空间

我需要从肥皂信息中删除肥皂信封.为此,我想使用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)

有人可以提供一些关于如何做到这一点的想法吗?

xml xslt

1
推荐指数
1
解决办法
7374
查看次数

标签 统计

xml ×1

xslt ×1