我想检查我的XML元素之一是否包含另一个元素忽略大小写的值。
这是我尝试过的:
string title = xhtmldoc.Root.Element(htmlNamespace + "head").Element(htmlNamespace + "title").Value;
TextBoxPublisher.Text = xhtmldoc.Descendants(htmlNamespace + "p").FirstOrDefault(copy => copy.Value.Contains(title, StringComparison.InvariantCultureIgnoreCase)).Value;
这是错误的。我应该如何进行?