【发布时间】:2019-09-23 10:30:30
【问题描述】:
我想将 JSON 文件转换为 xml。
java -jar c:\saxon\saxon9he.jar -s:C:json -xsl:C:test.xsl -o:C:xml
用于转换的 XSLT:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
> <xsl:output method="xml" indent="yes"/>
> <xsl:param name="input" select="'../json/test.json'"/>
> <xsl:template name="xsl:initial-template">
> <xsl:apply-templates select="json-to-xml(unparsed-text($input))" mode="copy"/>
> </xsl:template>
> <xsl:template match="node() | @*" mode="copy">
> <xsl:copy>
> <xsl:apply-templates select="node() | @*" mode="copy"/>
> </xsl:copy>
> </xsl:template>
> </xsl:stylesheet>
我认为处理器需要一个 XML 文件作为输入。我必须使用哪个处理器还是有其他错误?
提前致谢!
【问题讨论】: