code: function(uri) {
          var prefix = null;
          if(uri == null) {
              prefix = this.namespaces[this.defaultPrefix];
          } else {
              for(prefix in this.namespaces) {
                  if(this.namespaces[prefix] == uri) {
                      break;
                  }
              }
          }
          return prefix;
      }
docs: Method: getNamespacePrefix
  Get the namespace prefix for a given uri from the <namespaces> object.
  
  Returns:
  {String} A namespace prefix or null if none found.