remove xml tags with XSLT

前端 未结 2 1268
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-06 20:06

I have the following xml file:


  
    
    
     ... 

        
相关标签:
2条回答
  • 2020-12-06 20:36

    Identity transformation plus <xsl:template match="commercialType" priority="10"/>.

    0 讨论(0)
  • 2020-12-06 20:41

    This transformation produces the desired results:

    <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:output omit-xml-declaration="yes" indent="yes"/>
    
     <xsl:template match="node()|@*">
      <xsl:copy>
       <xsl:apply-templates select="node()|@*"/>
      </xsl:copy>
     </xsl:template>
    
     <xsl:template match="commercialType|userList|officesList"/>
    </xsl:stylesheet>
    
    0 讨论(0)
提交回复
热议问题