XPath has one big disadvantage–it’s case sensitive. Unlike regular expressions, there is no way to “turn it off”. But there is a way around it. To make part of the query case insensitive we have to use translate() function. This function takes three arguments: string that will be modified, string that lists “originals”, and finally string that contains “replacements”. If there is more characters in the second string, then any extra character will be removed. For example, if we want any node element with attribute Name equal to ‘first’ (case-insensitive):
↧