XElement.Descendants () 方法接受要查找的元素的名称。
但是它是区分大小写的,有没有办法让它不区分大小写
最佳答案
你可以使用这个:
element.Descendants()
.Where(x => string.Compare(x.Name, filter,
StringComparison.OrdinalIgnoreCase) == 0);
关于xml - XElement.Descendants () 使其不区分大小写,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14977166/