我正在使用以下XSLT從XML中刪除空節點。它通過刪除空節點正常工作,但它也添加了CRLF來代替刪除的節點。使用XSLT刪除XML的節點 - 不需要針對刪除的節點/字段的CRLF
<xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
<xsl:template match="*[not(child::node())]"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
我不需要這些CRLFs。請建議!
使用'的 '和添加'縮進= 「是」''中的xsl:output' –