w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Removing empty nodes from XML using XSLT - Attributes should not be removed from non-empty nodes

Use this:

<xsl:template match="*[not(child::node())]"/>
<xsl:template match="@*|node()">
    <xsl:copy>
        <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
</xsl:template>




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.