flowplayer flash flv no longer work, move to mp4
[booh] / lib / booh / rexml / element.rb
index 2676fcff4efac990b426b84bd7a99fdf09da5c3b..fbc5d0c40ac997933ff775b2b202b655872a96a8 100644 (file)
@@ -551,9 +551,13 @@ module REXML
                #################################################
 
                def attribute( name, namespace=nil )
-                       prefix = nil
-      prefix = namespaces.index(namespace) if namespace
-                       attributes.get_attribute( "#{prefix ? prefix + ':' : ''}#{name}" )
+                    prefix = nil
+                    if namespaces.respond_to? :key
+                        prefix = namespaces.key(namespace) if namespace
+                    else
+                        prefix = namespaces.index(namespace) if namespace
+                    end
+                    attributes.get_attribute( "#{prefix ? prefix + ':' : ''}#{name}" )
                end
 
                # Evaluates to +true+ if this element has any attributes set, false