开发者

Why is XPathNavigator case sensitive?

XPathNavigator navigator = 开发者_Python百科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'


Because XPath operators are case-sensitive.


"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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜