Can I add an XML declaration to an XSLT output?

后端 未结 1 920
北海茫月
北海茫月 2021-01-19 12:30

Here is my current XML output:

    
    
    

        
相关标签:
1条回答
  • 2021-01-19 13:01

    Just use xsl:output.

    Example...

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