听起来你想将变量转换为字符串。我会使用XSL转换。转换的输入将是您新翻译的变量,输出是一个普通的旧String变量。变换看起来像这样:
<xsl:template match="/"> <tns:myString> <xsl:copy-of select="/ns0:RootElement"/> </tns:myString> </xsl:template>
如果您愿意,可以将此字符串写入文件适配器