XmlPath case insensitive search RRS feed

  • Question

  • User-1556877445 posted


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

    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.

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

    Any help appreciated.


    Wednesday, November 26, 2014 6:48 PM

All replies