> Thanks. It explains why ends-with doesn't work either. I don't suppose XPath 2.0 version is supported or will be supported?
I haven’t heard of anyone working on that, and it seems unlikely to happen within the near future as few, if any, libraries support XPath 2.0 (or later).
Only XPath 1.0 is supported by libxml2. And this library is in permanent feature freeze mode :-(. Unfortunately, there is not any other library with friendly licence available for C language.