tags:

views:

83

answers:

2
XPathNavigator navigator = myApp.XML.CreateNavigator();
XPathExpression expression = navigator.Compile("true"); //works
XPathExpression expression = navigator.Compile("true or true"); //works
XPathExpression expression = navigator.Compile("true OR true) //'System.Xml.XPath.XPathException'
+2  A: 

Because XPath operators are case-sensitive.

dtb
A: 

"or" is a keyword/operator in XPath, and as such is only going to be interpreted correctly in its lowercase form. Is that what you were looking for? XML and XPath are case-sensitive in general, but the keyword issue is the specific reason you're seeing the error you indicated in your post.

Shaun