code: public Enumeration getPrefixes(String uri) {
          ArrayList<String> prefixes = new ArrayList<String>();
          Enumeration allPrefixes = getPrefixes();
          while (allPrefixes.hasMoreElements()) {
              String prefix = (String) allPrefixes.nextElement();
              if (uri.equals(getURI(prefix))) {
                  prefixes.add(prefix);
              }
          }
          return Collections.enumeration(prefixes);
      }
docs: Return an enumeration of all prefixes for a given URI whose
  declarations are active in the current context.
  This includes declarations from parent contexts that have
  not been overridden.
  
  <p>This method returns prefixes mapped to a specific Namespace
  URI.  The xml: prefix will be included.  If you want only one
  prefix that's mapped to the Namespace URI, and you don't care
  which one you get, use the {@link #getPrefix getPrefix}
  method instead.</p>
  
  <p><strong>Note:</strong> the empty (default) prefix is <em>never</em> included
  in this enumeration; to check for the presence of a default
  Namespace, use the {@link #getURI getURI} method with an
  argument of "".</p>
  
  @param uri The Namespace URI.
  @return An enumeration of prefixes (never empty).
  @see #getPrefix
  @see #getDeclaredPrefixes
  @see #getURI