如何在XSLT输出中定制XML声明标记?
我的XSLT将XML转换为XML。它输出以下声明标记:如何在XSLT输出中定制XML声明标记?,xml,xslt,Xml,Xslt,我的XSLT将XML转换为XML。它输出以下声明标记: <?xml version="1.0" encoding="utf-16"?> 但我需要它输出以下内容: <?xml version="1.0" encoding="utf-8" standalone="yes"?> 如何操作?在您使用的XSLT中,请在元素中添加以下属性 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/
<?xml version="1.0" encoding="utf-16"?>
但我需要它输出以下内容:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
如何操作?在您使用的XSLT中,请在
元素中添加以下属性
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" standalone="yes"/>
......
</xsl:stylesheet>
......
这应该得到输出