|
|
|
40分 |
XElement e = null;
foreach (var node in e.Nodes())
{
if (node.NodeType == System.Xml.XmlNodeType.Comment)
{
//通过循环获取备注
}
}
e.Nodes().Where(n => n.NodeType == System.Xml.XmlNodeType.Comment);//直接linq获取备注
|
|
如果你想要完全对应上,你就不能这么简单的用linq了,只能循环
|
|
|
https://social.microsoft.com/Forums/zh-CN/52910e98-485f-424a-b984-7e7d7a899456/c-xml?forum=visualcshartzhchs
|
|