【发布时间】:2009-04-01 19:51:33
【问题描述】:
我想使用 Linq to xml 从表达式树创建一个 MathML 文档,但我不知道如何使用 MathML xml 实体(例如 ⁡ 和 &InvisibleTimes): 当我尝试使用
直接创建 XElementXElement xe = new XElement("mo", "&InvisibleTimes");
它只是逃脱了&符号(这不好)。 我也尝试使用 XElement.Parse
XElement xe = new XElement.Parse("<mo>&InvisibleTimes</mo>");
但它失败并出现 System.XmlException: Reference to undeclared entity 'InvisibleTimes' 如何声明实体或忽略检查?
【问题讨论】: