小编Ada*_*m L的帖子

我可以向XSLT输出添加XML声明吗?

这是我当前的XML输出:

    <EmployeeImport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Employee>
    <EmployeeNumber>123</EmployeeNumber>
    <FirstName>Jose</FirstName>
    </Employee>
    </EmployeeImport>
Run Code Online (Sandbox Code Playgroud)

等等.我希望得到的输出如下:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <EmployeeImport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Employee>
    <EmployeeNumber>123</EmployeeNumber>
    <FirstName>Jose</FirstName>
    </Employee>
    </EmployeeImport>
Run Code Online (Sandbox Code Playgroud)

我希望能够将第一行添加到我的输出中.在我的XSLT中,我试过了&lt;

打印"<"但它被解释为&lt;.我也尝试过<xsl:text>,但遇到了同样的问题.有没有办法将这个声明行添加到我的XSLT?

xml xslt

4
推荐指数
1
解决办法
2504
查看次数

标签 统计

xml ×1

xslt ×1