When using GPathResult with XmlSlurper, if an attribute is in a namespace, you must retrieve it using the namespace prefix defined in the document and not that defined by declareNamespace. This issue prevents safe retrieval of namespaced XML attributes since the document generator is free to choose namespace prefix.
Looking in the debugger, there is namespaceMap and namespaceTagHints in GPathResult. namespaceMap is updated by declareNamespace but namespaceTagHints is not, and namespaceTagHints is used when looking up attributes. I don't see a way to update namespaceTagHints and namespaceMap doesn't really even seem to be used.