1 Reply Latest reply on Jan 16, 2007 8:54 AM by e.esquivel

    XMLSearch / case in-sensitive search in a text node value with XPATH

    e.esquivel Level 1
      Hi everyone,
      I was aggregating some XML files and queries for a search engine. It is pretty easy with coldfusion XML functions BUT ....
      I was looking around XMLSearch to do a simple text search into nodes and I am stuck with it.

      with something like that :
      selectedElements = XmlSearch(myxmldoc, '(/directory/user[contains(.,"#form.firstName#")])');

      Without loop all the XML elements, I cannot put firstName text nodes to lower-case, do a simple search into the directory and get user entries.

      Is it possible to do with XPATH something like that :
      selectedElements = XmlSearch(myxmldoc, '(/directory/user[contains(lower-case(.),lower-case("#form.firstName#"))])');

      Thanks for your help.