如何解决生成的异常?
public static string[] getKeywords(string filename)
{
var xmlFile = new XElement(filename);
string[] keywords = xmlFile.Elements("Keyword")
.Attributes("name")
.Select(n => n.Value).ToArray();
return keywords;
}
Run Code Online (Sandbox Code Playgroud)
这会生成此异常:
System.Xml.XmlException未处理Message ='/'字符,十六进制值0x2F,不能包含在名称中.来源=的System.Xml
| 归档时间: |
|
| 查看次数: |
6052 次 |
| 最近记录: |