XSLT拷贝所有节点

来源:互联网 发布:速龙数据恢复软件下载 编辑:程序博客网 时间:2024/05/16 14:56

XSLT递归拷贝所有节点或属性:

<?xml version='1.0' encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
    <xsl:template match="@*|node()">
        <xsl:copy>
            <xsl:apply-templates select="@*|node()"/>
        </xsl:copy>
    </xsl:template>
</xsl:stylesheet>