XmlPath case insensitive search

ma701ss

Member
Joined
Dec 2, 2012
Messages
9
Programming Experience
1-3
Hi,


I've tried this to search for the word 'apple' within 'DESCRIPTION' of all 'PRODUCT' elements in an xml document:


VB.NET:
Dim fruit As XmlNodeList = doc.SelectNodes("//PRODUCT[translate(., 'ABCDEFGHJIKLMNOPQRSTUVWXYZ', 'abcdefghjiklmnopqrstuvwxyz') = contains(DESCRIPTION,'apple')]")
This works however if I change it to for example 'applE' it doesn't. I want to be able to search with no case sensitivity.


There are loads of variations on the syntax I've found on Google but it's all a bit confusing.


Any help appreciated.


Thanks
 
Back
Top