Created
December 9, 2011 06:13
-
-
Save benoitpointet/1450437 to your computer and use it in GitHub Desktop.
XSL transform that empties an xml file of all its content, retains structure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > | |
<xsl:template match="*"> | |
<xsl:copy> | |
<xsl:apply-templates select="@*"/> | |
<xsl:apply-templates select="*" /> | |
</xsl:copy> | |
</xsl:template> | |
<xsl:template match="@*"> | |
<xsl:attribute name="{name()}" /> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment