c# - xml和xslt之间的转换处理时如何产生异常错误

标签 c# xml xslt

我怀疑我们在 c#.net 中执行任何进程时是否会出现某些错误,当时我们陷入错误日志中

同样 当假设我们在 xml 和 xslt 之间执行任何处理错误时,可能会出现我们如何捕获该异常!

任何人都可以有想法......因为它会用于我的验证,所以请让我知道任何可能性。

最佳答案

您可以使用 xsl:message .

The xsl:message instruction sends a message in a way that is dependent on the XSLT processor. The content of the xsl:message instruction is a template. The xsl:message is instantiated by instantiating the content to create an XML fragment. This XML fragment is the content of the message.

NOTE:An XSLT processor might implement xsl:message by popping up an alert box or by writing to a log file.

If the terminate attribute has the value yes, then the XSLT processor should terminate processing after sending the message. The default value is no.

<xsl:message
  terminate = "yes">
  <!-- Content: message describing the error -->
</xsl:message>

关于c# - xml和xslt之间的转换处理时如何产生异常错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7129720/

相关文章:

xslt - 如何访问此特定xml节点的值?

c# 如何发送仍在写入的文件流并一直发送到创建结束

c# - resx 资源文件显示警告 "The resource name is not a valid identifier"

c# - 测量 OData 响应的输出

php - 通过php在xml文件中添加节点

java - SAX 解析器由于 <br/> 标记而忽略文本

c# - 您能否将装饰器的位置附加到装饰元素左上角以外的任何位置?

xml - 具有多个请求的 jMeter Soap 测试

xml - 使用 XSLT 对 XML 中相似节点的内容进行分组

xslt - 使用 XSLT 记录日志