Tim Huffam

Dotting the I and crossing the T of I.T.

  Home  |   Contact  |   Syndication    |   Login
  129 Posts | 0 Stories | 873 Comments | 677 Trackbacks

News

Archives

Post Categories

Interesting Blogs/Links

XPath statements are case sensitive.  To get around this use the following example to convert all data to lower case before performing the equality check:

/bookstore/book[translate(@category, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = '" + searchtext.ToLower() + "']

Thanks very much to Harish for this!

posted on Thursday, July 06, 2006 11:01 AM

Feedback

# re: Case insensitive XPath 6/19/2007 5:52 AM kbird
thanks nice work around!

# re: Case insensitive XPath 9/21/2007 1:26 AM Anoop
Hi,

I am getting an XPAth expression an an input from a text box as a string and then using the string to make an XPAth search. How can I use this tranlate func() there to make my search case insensitive. I am working in C# .Net.

Post Feedback

Title:
Name:
Email: (never displayed)
Url:
Comments: 
Please add 4 and 2 and type the answer here: