当我使用XElement解析以下字符串时,出现NotSupportedException:

<ref>S. L. Vartanyan*, V. E. Garutt† & A. V. Sher‡parallel, "Holocene dwarf mammoths from Wrangel Island in the Siberian Arctic", Nature 362, 337&nbsp;– 340 (25 March 1993) [http://www.nature.com/nature/journal/v362/n6418/abs/362337a0.html Nature.com]</ref>


有谁知道为什么我会收到此错误?

最佳答案

可能是&nbsp;-除非您使用html,否则不是xml实体,并且&也应该是&amp;

基本上,这不是xml ...

这有效:

@"<ref>S. L. Vartanyan*, V. E. Garutt† &amp; A. V. Sher‡parallel, ""Holocene dwarf mammoths from Wrangel Island in the Siberian Arctic"", Nature 362, 337not-nbsp;– 340 (25 March 1993) [http://www.nature.com/nature/journal/v362/n6418/abs/362337a0.html Nature.com]</ref>");

关于c# - XElement.Parse NotSuportedException,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/3265578/

10-09 02:07