It told me that there was no 'foo' tag despite being clearly there and that being recognized as a 'foo' tag previously. Eventually I figured out that XML amespaces were to blame
I find it very unfortunate that XPath requires you to specify the namespace. I wish libxml had an option to configure what it meant to have no prefix in an XPath node test:
- Missing prefix = Match the null namespace. (Standard)
- Missing prefix = Match some previously defined default namespace.
- Missing prefix = Match any namespace.