【发布时间】:2016-05-10 01:51:05
【问题描述】:
我正在尝试用 C 语言的 XDocument 阅读这个 XML 文档。
<Instrument_Root>
<Instrument_ID>123</Instrument_ID>
<Deal_number xsi:nil="true"/>
</Instrument_Root>
我使用下面的代码来阅读 XML 文档:
XDocument xDoc = XDocument.Load("XMLFile1.xml");
由于 xsi:nil,我收到一条错误消息
错误消息:未声明的 System.Xml.dll 'xsi' 中发生了“System.Xml.XmlException”类型的未处理异常。
有没有办法将 xsi 视为 NULL?
谢谢
【问题讨论】: