我有一个富文本编辑器,可以将我的标记保存到数据库中。我有一个使用 XML Auto 带回该数据的存储过程。问题,您可能已经猜到了,XML Auto 对我的标记进行编码,因此富文本不会显示在我的网页显示上。仅显示标记文字。
我可以在 XML Auto 中做些什么来防止某些字段被编码?欢迎其他想法。
XML
    <xsl:template match="@* | node()">
        <xsl:copy>
            <xsl:apply-templates select="@* | node()"/>
        </xsl:copy>
    </xsl:template>
</xsl:stylesheet>
XSL
<?xml version="1.0" encoding="utf-8"?>
<catalog>
  <cd>
    <album>Thriller</album>
    <artist>Michael Jackson</artist>
    <notes><strong>test</strong></notes>
  </cd>
  <cd>
    <album>Album2</album>
    <artist>Artist2</artist>
    <notes>Can be plain text as well.</notes>
  </cd>
</catalog>
c# XSLT
        string xmlFile = @"XMLFile.xml"; //<view>html column</view>
        string xslFile = @"XSLTFile.xslt"; //views.xsl file
        string xmlFilePath = Request.PhysicalApplicationPath + xmlFile;
        string xsltPath = Request.PhysicalApplicationPath + xslFile;
        XPathDocument xPathDoc = new XPathDocument(xmlFilePath);
        XslCompiledTransform transform = new XslCompiledTransform();
        transform.Load(xsltPath);
        transform.Transform(xPathDoc, null, Response.Output);