How to convert XML xpath as case insensitive?
XmlNodeList elements = mConfig.SelectNodes(path);
path can be - Config/Setting/Name or config/setting/name
How to convert XML xpath as case insensitive?
XmlNodeList elements = mConfig.SelectNodes(path);
path can be - Config/Setting/Name or config/setting/name
XML is case sensitive, hence a node with then name Config
is does have the same name as the node config
. Hence XPath must also respect this.
If you feel you need to use case-insensitive XPaths such as this then you really need to go back to the source of the XML and ask, "why is this generating XML where two nodes have the same meaning same yet differ casing"? Then fix that.