替换源 xml 中的命名空间

发布于 2024-11-04 14:14:26 字数 7980 浏览 1 评论 0原文

我已经搜索过,但找不到处理 xslt 1.0 中的命名空间的适当解决方案。每个节点都有许多属性,但为了便于阅读,我没有显示它们。

我的输入 xml

<?xml version="1.0" encoding="UTF-8"?>
<Vendor VendorId="v1" VendorName="vaseline health" xmlns:ns1="http://ABCSampleDemo.SampleDemo" >
    <Customer CustId="c1" CustomerName="John Dillon" CustomerAddress="3093 jerfe st" Code="APL111">
        <POrders PId="P0110" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T000" PurchaseStart="09-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" />
                <ID AuthId= "1111"/>
        <POrders PId="P0111" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T000" PurchaseStart="09-09-2012" PurchaseEnd="10-10-2011" WarehouseId="W2013" />
                <ID AuthId= "1111"/>
        <POrders PId="P0112" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T000" PurchaseStart="09-09-2012" PurchaseEnd="10-10-2011" WarehouseId="W2013" />
                <ID AuthId= "1111"/>
        <POrders PId="P0113" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T001" PurchaseStart="09-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" />
                <ID AuthId= "1111"/>
        <POrders PId="P0114" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T001" PurchaseStart="09-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" />
                <ID AuthId= "1111"/>
        <POrders PId="P0115" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T001" PurchaseStart="09-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" />
                <ID AuthId= "1111"/>
        <POrders PId="P0116" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T001" PurchaseStart="09-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" />
                <ID AuthId= "1111"/>    
        <POrders PId="P0117" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T001" PurchaseStart="09-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" />
            <ID AuthId= "1111"/>
        <POrders PId="P0118" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T001" PurchaseStart="09-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" />
                <ID AuthId= "1111"/>        
    </Customer>
    <Customer CustId="C2" CustomerName="Mac Payne" CustomerAddress="3333 jerfe st" Code="APL113">
        <POrders PId="P2221" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T000" PurchaseStart="01-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" />
            <ID AuthId= "1111"/>
        <POrders PId="P2222" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T000" PurchaseStart="01-09-2012" PurchaseEnd="10-10-2011" WarehouseId="W2013" />
            <ID AuthId= "1111"/>
        <POrders PId="P2223" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T000" PurchaseStart="01-09-2012" PurchaseEnd="10-10-2011" WarehouseId="W2013" />
            <ID AuthId= "1111"/>
        <POrders PId="P2224" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T001" PurchaseStart="01-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" />
            <ID AuthId= "1111"/>
        <POrders PId="P2225" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T001" PurchaseStart="01-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" />
            <ID AuthId= "1111"/>
    </Customer> 
</Vendor>

CURRENT SS,

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:strip-space elements="*"/>
    <xsl:key name=" KPOrderAttrb" use="concat(@ServiceRef,'+',@WarehouseId,'+',substring(@PurchaseStart,1,10))" match="POrders"/>
        <xsl:template match="node()|@*">
            <xsl:copy>
        <xsl:apply-templates select="@*"/>
        <xsl:for-each select="Customer">
            <xsl:copy>
                <xsl:copy-of select="@*"/>
                <xsl:attribute name="ClientSeqNo"><xsl:number  count="Customer"/></xsl:attribute>
                <xsl:for-each select="descendant::POrders[generate-id()  =  generate-id(key('KPOrderAttrb', concat(@ServiceRef,'+',@WarehouseId,'+',substring(@PurchaseStart,1,10))) [1] )]">
                    <xsl:copy>
                        <xsl:copy-of select="@*"/>
                        <xsl:variable name="vGroup" select="key('KPOrderAttrb',concat(@ServiceRef,'+',@WarehouseId,'+',substring(@PurchaseStart,1,10)))"/>
                        <xsl:variable name="vPOrderIds">
                            <xsl:for-each select="$vGroup">
                                <xsl:sort select="@PId" data-type="number"/>
                                <xsl:if test="not(position()=1)">
                                    <xsl:value-of select="','"/>
                                </xsl:if>
                                <xsl:value-of select="@PId"/>
                            </xsl:for-each>
                        </xsl:variable>
                        <xsl:attribute name="index"><xsl:value-of select="position()"/></xsl:attribute>
                        <xsl:attribute name="Code"><xsl:value-of select="ancestor::Customer[1]/@Code"/></xsl:attribute>
                        <xsl:attribute name="AuthId"><xsl:value-of select="descendant::ID[1]/@AuthId"/></xsl:attribute>
                        <xsl:attribute name="CombinePOID"><xsl:value-of select="$vPOrderIds"/></xsl:attribute>
                        <xsl:attribute name="Amount"><xsl:value-of select="sum($vGroup/@Amount)"/></xsl:attribute>
                    </xsl:copy>
                </xsl:for-each>
            </xsl:copy>
        </xsl:for-each>
    </xsl:copy>
        </xsl:template>
</xsl:stylesheet>

所需的输出 xml

    <Vendor xmlns:ns1="http://xyzDemo.xyzDemo" VendorId="v1" VendorName="vaseline health">
    <Customer CustId="c1" CustomerName="John Dillon" CustomerAddress="3093 jerfe st" Code="APL111" ClientSeqNo="1">
        <POrders PId="P0110" PName="uuu aillw" Units="3" ServiceRef="T000" PurchaseStart="09-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" index="1" Code="APL111" AuthId="" CombinePOID="P0110" Amount="100"/>
        <POrders PId="P0111" PName="uuu aillw" Units="3" ServiceRef="T000" PurchaseStart="09-09-2012" PurchaseEnd="10-10-2011" WarehouseId="W2013" index="2" Code="APL111" AuthId="" CombinePOID="P0111,P0112" Amount="200"/>
        <POrders PId="P0113" PName="uuu aillw" Units="3" ServiceRef="T001" PurchaseStart="09-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" index="3" Code="APL111" AuthId="" CombinePOID="P0113,P0114,P0115,P0116,P0117,P0118" Amount="600"/>
    </Customer>
    <Customer CustId="C2" CustomerName="Mac Payne" CustomerAddress="3333 jerfe st" Code="APL113" ClientSeqNo="2">
        <POrders PId="P2221" PName="uuu aillw" Units="3" ServiceRef="T000" PurchaseStart="01-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" index="1" Code="APL113" AuthId="" CombinePOID="P2221" Amount="100"/>
        <POrders PId="P2222" PName="uuu aillw" Units="3" ServiceRef="T000" PurchaseStart="01-09-2012" PurchaseEnd="10-10-2011" WarehouseId="W2013" index="2" Code="APL113" AuthId="" CombinePOID="P2222,P2223" Amount="200"/>
        <POrders PId="P2224" PName="uuu aillw" Units="3" ServiceRef="T001" PurchaseStart="01-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" index="3" Code="APL113" AuthId="" CombinePOID="P2224,P2225" Amount="200"/>
    </Customer>
</Vendor>

i have searched but i couldn't find appropriate solution for handling namespace in xslt 1.0. Each node has many attributes but for easy readability i haven't shown them.

My input xml

<?xml version="1.0" encoding="UTF-8"?>
<Vendor VendorId="v1" VendorName="vaseline health" xmlns:ns1="http://ABCSampleDemo.SampleDemo" >
    <Customer CustId="c1" CustomerName="John Dillon" CustomerAddress="3093 jerfe st" Code="APL111">
        <POrders PId="P0110" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T000" PurchaseStart="09-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" />
                <ID AuthId= "1111"/>
        <POrders PId="P0111" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T000" PurchaseStart="09-09-2012" PurchaseEnd="10-10-2011" WarehouseId="W2013" />
                <ID AuthId= "1111"/>
        <POrders PId="P0112" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T000" PurchaseStart="09-09-2012" PurchaseEnd="10-10-2011" WarehouseId="W2013" />
                <ID AuthId= "1111"/>
        <POrders PId="P0113" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T001" PurchaseStart="09-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" />
                <ID AuthId= "1111"/>
        <POrders PId="P0114" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T001" PurchaseStart="09-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" />
                <ID AuthId= "1111"/>
        <POrders PId="P0115" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T001" PurchaseStart="09-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" />
                <ID AuthId= "1111"/>
        <POrders PId="P0116" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T001" PurchaseStart="09-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" />
                <ID AuthId= "1111"/>    
        <POrders PId="P0117" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T001" PurchaseStart="09-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" />
            <ID AuthId= "1111"/>
        <POrders PId="P0118" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T001" PurchaseStart="09-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" />
                <ID AuthId= "1111"/>        
    </Customer>
    <Customer CustId="C2" CustomerName="Mac Payne" CustomerAddress="3333 jerfe st" Code="APL113">
        <POrders PId="P2221" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T000" PurchaseStart="01-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" />
            <ID AuthId= "1111"/>
        <POrders PId="P2222" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T000" PurchaseStart="01-09-2012" PurchaseEnd="10-10-2011" WarehouseId="W2013" />
            <ID AuthId= "1111"/>
        <POrders PId="P2223" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T000" PurchaseStart="01-09-2012" PurchaseEnd="10-10-2011" WarehouseId="W2013" />
            <ID AuthId= "1111"/>
        <POrders PId="P2224" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T001" PurchaseStart="01-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" />
            <ID AuthId= "1111"/>
        <POrders PId="P2225" PName="uuu aillw" Units="3" Amount="100" ServiceRef="T001" PurchaseStart="01-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" />
            <ID AuthId= "1111"/>
    </Customer> 
</Vendor>

CURRENT SS,

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:strip-space elements="*"/>
    <xsl:key name=" KPOrderAttrb" use="concat(@ServiceRef,'+',@WarehouseId,'+',substring(@PurchaseStart,1,10))" match="POrders"/>
        <xsl:template match="node()|@*">
            <xsl:copy>
        <xsl:apply-templates select="@*"/>
        <xsl:for-each select="Customer">
            <xsl:copy>
                <xsl:copy-of select="@*"/>
                <xsl:attribute name="ClientSeqNo"><xsl:number  count="Customer"/></xsl:attribute>
                <xsl:for-each select="descendant::POrders[generate-id()  =  generate-id(key('KPOrderAttrb', concat(@ServiceRef,'+',@WarehouseId,'+',substring(@PurchaseStart,1,10))) [1] )]">
                    <xsl:copy>
                        <xsl:copy-of select="@*"/>
                        <xsl:variable name="vGroup" select="key('KPOrderAttrb',concat(@ServiceRef,'+',@WarehouseId,'+',substring(@PurchaseStart,1,10)))"/>
                        <xsl:variable name="vPOrderIds">
                            <xsl:for-each select="$vGroup">
                                <xsl:sort select="@PId" data-type="number"/>
                                <xsl:if test="not(position()=1)">
                                    <xsl:value-of select="','"/>
                                </xsl:if>
                                <xsl:value-of select="@PId"/>
                            </xsl:for-each>
                        </xsl:variable>
                        <xsl:attribute name="index"><xsl:value-of select="position()"/></xsl:attribute>
                        <xsl:attribute name="Code"><xsl:value-of select="ancestor::Customer[1]/@Code"/></xsl:attribute>
                        <xsl:attribute name="AuthId"><xsl:value-of select="descendant::ID[1]/@AuthId"/></xsl:attribute>
                        <xsl:attribute name="CombinePOID"><xsl:value-of select="$vPOrderIds"/></xsl:attribute>
                        <xsl:attribute name="Amount"><xsl:value-of select="sum($vGroup/@Amount)"/></xsl:attribute>
                    </xsl:copy>
                </xsl:for-each>
            </xsl:copy>
        </xsl:for-each>
    </xsl:copy>
        </xsl:template>
</xsl:stylesheet>

desired output xml

    <Vendor xmlns:ns1="http://xyzDemo.xyzDemo" VendorId="v1" VendorName="vaseline health">
    <Customer CustId="c1" CustomerName="John Dillon" CustomerAddress="3093 jerfe st" Code="APL111" ClientSeqNo="1">
        <POrders PId="P0110" PName="uuu aillw" Units="3" ServiceRef="T000" PurchaseStart="09-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" index="1" Code="APL111" AuthId="" CombinePOID="P0110" Amount="100"/>
        <POrders PId="P0111" PName="uuu aillw" Units="3" ServiceRef="T000" PurchaseStart="09-09-2012" PurchaseEnd="10-10-2011" WarehouseId="W2013" index="2" Code="APL111" AuthId="" CombinePOID="P0111,P0112" Amount="200"/>
        <POrders PId="P0113" PName="uuu aillw" Units="3" ServiceRef="T001" PurchaseStart="09-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" index="3" Code="APL111" AuthId="" CombinePOID="P0113,P0114,P0115,P0116,P0117,P0118" Amount="600"/>
    </Customer>
    <Customer CustId="C2" CustomerName="Mac Payne" CustomerAddress="3333 jerfe st" Code="APL113" ClientSeqNo="2">
        <POrders PId="P2221" PName="uuu aillw" Units="3" ServiceRef="T000" PurchaseStart="01-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" index="1" Code="APL113" AuthId="" CombinePOID="P2221" Amount="100"/>
        <POrders PId="P2222" PName="uuu aillw" Units="3" ServiceRef="T000" PurchaseStart="01-09-2012" PurchaseEnd="10-10-2011" WarehouseId="W2013" index="2" Code="APL113" AuthId="" CombinePOID="P2222,P2223" Amount="200"/>
        <POrders PId="P2224" PName="uuu aillw" Units="3" ServiceRef="T001" PurchaseStart="01-09-2011" PurchaseEnd="10-10-2011" WarehouseId="W2023" index="3" Code="APL113" AuthId="" CombinePOID="P2224,P2225" Amount="200"/>
    </Customer>
</Vendor>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

请持续率性 2024-11-11 14:14:26

以下内容有效:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt"
    xmlns:ns1="http://XYZSampleDemo.XyxSampleDemo"
    xmlns:ns1old="http://ABCSampleDemo.SampleDemo"
    exclude-result-prefixes="msxsl">
  <xsl:output method="xml" indent="yes"/>

  <!-- Standard xslt copy template -->
  <xsl:template match="@* | node()">
    <xsl:copy>
      <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
  </xsl:template>

  <!-- Match any element (*) in the old namespace -->
  <xsl:template match="@ns1old:*">
    <!-- Output a new element in the new namespace -->
    <xsl:element name="ns1:{local-name()}">
      <!-- Copy all child attributes and nodes -->
      <xsl:apply-templates select="@* | node()"/>
    </xsl:element>
  </xsl:template>
</xsl:stylesheet>

但是它使名称空间声明本身变得有点混乱

更新: 我已经很接近了,我所需要做的就是添加一个 @ 在我的模板选择器中的 ns1old 前面 - 现在这与您想要的输出完全匹配。

The following works:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt"
    xmlns:ns1="http://XYZSampleDemo.XyxSampleDemo"
    xmlns:ns1old="http://ABCSampleDemo.SampleDemo"
    exclude-result-prefixes="msxsl">
  <xsl:output method="xml" indent="yes"/>

  <!-- Standard xslt copy template -->
  <xsl:template match="@* | node()">
    <xsl:copy>
      <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
  </xsl:template>

  <!-- Match any element (*) in the old namespace -->
  <xsl:template match="@ns1old:*">
    <!-- Output a new element in the new namespace -->
    <xsl:element name="ns1:{local-name()}">
      <!-- Copy all child attributes and nodes -->
      <xsl:apply-templates select="@* | node()"/>
    </xsl:element>
  </xsl:template>
</xsl:stylesheet>

However it made a bit of a mess of the namespace declarations themselves

Update: I was so close, all I needed to do was to add an @ in front of ns1old in my template selector - this now exactly matches your desired output.

梦途 2024-11-11 14:14:26

此样式表:

<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:ns1="http://ABCSampleDemo.SampleDemo"
 xmlns:ns2="http://XYZSampleDemo.XyxSampleDemo"
 exclude-result-prefixes="ns1">
    <xsl:template match="node()|@*">
        <xsl:copy>
            <xsl:apply-templates select="node()|@*"/>
        </xsl:copy>
    </xsl:template>
    <xsl:template match="*[namespace::*[
                              . = 'http://ABCSampleDemo.SampleDemo'
                           ]
                         ]">
        <xsl:element name="{name()}">
            <xsl:copy-of
                 select="namespace::*[
                            not(.='http://ABCSampleDemo.SampleDemo')
                         ]"/>
            <xsl:apply-templates select="node()|@*"/>
        </xsl:element>
    </xsl:template>
    <xsl:template match="ns1:*" priority="1">
        <xsl:element name="ns2:{local-name()}">
            <xsl:copy-of
                 select="namespace::*[
                            not(.='http://ABCSampleDemo.SampleDemo')
                         ]"/>
            <xsl:apply-templates select="node()|@*"/>
        </xsl:element>
    </xsl:template>
    <xsl:template match="@ns1:*">
        <xsl:attribute name="ns2:{local-name()}">
            <xsl:value-of select="."/>
        </xsl:attribute>
    </xsl:template>
</xsl:stylesheet>

输出:

<ns2:VEN VendorRef="24873" xmlns:ns2="http://XYZSampleDemo.XyxSampleDemo">
    <CUS ClientRef="333444555" Code="ZZZZ">
        <MEM MembershipRef="2406">
            <ID AuthorizationId="1592"></ID>
        </MEM>
        <MEM MembershipRef="2407">
            <ID AuthorizationId="1592"></ID>
        </MEM>
    </CUS>
    <CUS ClientRef="333444551" Code="ZZZZ">
        <MEM MembershipRef="2406">
            <ID AuthorizationId="1592"></ID>
        </MEM>
        <MEM MembershipRef="2407">
            <ID AuthorizationId="1592"></ID>
        </MEM>
    </CUS>
</ns2:VEN>

注意:命名空间与属性不同。这将从输入源中删除任何带有 http://ABCSampleDemo.SampleDemo URI 的命名空间声明,并保留任何其他声明。此命名空间 URI 下的元素(即使是默认命名空间)将被 http://XYZSampleDemo.XyxSampleDemo 命名空间 URI 下的元素替换(我们无法对命名空间前缀提供保证)。属性也一样。

This stylesheet:

<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:ns1="http://ABCSampleDemo.SampleDemo"
 xmlns:ns2="http://XYZSampleDemo.XyxSampleDemo"
 exclude-result-prefixes="ns1">
    <xsl:template match="node()|@*">
        <xsl:copy>
            <xsl:apply-templates select="node()|@*"/>
        </xsl:copy>
    </xsl:template>
    <xsl:template match="*[namespace::*[
                              . = 'http://ABCSampleDemo.SampleDemo'
                           ]
                         ]">
        <xsl:element name="{name()}">
            <xsl:copy-of
                 select="namespace::*[
                            not(.='http://ABCSampleDemo.SampleDemo')
                         ]"/>
            <xsl:apply-templates select="node()|@*"/>
        </xsl:element>
    </xsl:template>
    <xsl:template match="ns1:*" priority="1">
        <xsl:element name="ns2:{local-name()}">
            <xsl:copy-of
                 select="namespace::*[
                            not(.='http://ABCSampleDemo.SampleDemo')
                         ]"/>
            <xsl:apply-templates select="node()|@*"/>
        </xsl:element>
    </xsl:template>
    <xsl:template match="@ns1:*">
        <xsl:attribute name="ns2:{local-name()}">
            <xsl:value-of select="."/>
        </xsl:attribute>
    </xsl:template>
</xsl:stylesheet>

Output:

<ns2:VEN VendorRef="24873" xmlns:ns2="http://XYZSampleDemo.XyxSampleDemo">
    <CUS ClientRef="333444555" Code="ZZZZ">
        <MEM MembershipRef="2406">
            <ID AuthorizationId="1592"></ID>
        </MEM>
        <MEM MembershipRef="2407">
            <ID AuthorizationId="1592"></ID>
        </MEM>
    </CUS>
    <CUS ClientRef="333444551" Code="ZZZZ">
        <MEM MembershipRef="2406">
            <ID AuthorizationId="1592"></ID>
        </MEM>
        <MEM MembershipRef="2407">
            <ID AuthorizationId="1592"></ID>
        </MEM>
    </CUS>
</ns2:VEN>

Note: Namespaces are not the same as attributes. This will remove any namespace declaration with http://ABCSampleDemo.SampleDemo URI from the input source and keep any other one. Elements under this namespace URI (even as default namespace) will be replaced by elements under http://XYZSampleDemo.XyxSampleDemo namespace URI (We can't give warranty about the namespace prefix). The same for attributes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文