I\'m trying to use XPath to find all elements that have an element in a given namespace.
For example, in the following document I want to find the foo:bar
foo:bar
Your XPath expression is almost perfect. Instead of asking for attributes "@" ask for elements "" and it should work:
"//*[namespace-uri()='http://foo.example.com']"