Quantcast
Channel: User mykhailovskyi - Stack Overflow
Viewing all articles
Browse latest Browse all 29

Answer by mykhailovskyi for SelectNodes with XPath ignoring cases in node names

$
0
0

We may convert xml and our variables to lower case.

string value = "aBc";
XmlNode xmlnode = xmldoc.SelectSingleNode(string.Format("/some/path/add[translate(@key, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = '{0}']", value.ToLower()));

Viewing all articles
Browse latest Browse all 29

Trending Articles