for(Iterator i = namespaces.entrySet().iterator(); i.hasNext(); ) { Map.Entry entry = (Map.Entry)i.next(); if(entry.getValue().equals(uri)) return (String)entry.getKey(); } if(inScopeNamespaces != null) { for(Iterator i = inScopeNamespaces.entrySet().iterator(); i.hasNext(); ) { Map.Entry entry = (Map.Entry)i.next(); if(entry.getValue().equals(uri)) return (String)entry.getKey(); } } return null;
String prefix = (String)prefixes.get(uri); if(prefix == null) return inScopePrefixes == null ? null : (String) inScopeNamespaces.get(uri); else return prefix;
	public String getPrefixForURI(String uri) {		for(Iterator i = namespaces.entrySet().iterator(); i.hasNext(); ) {			Map.Entry entry = (Map.Entry)i.next();			if(entry.getValue().equals(uri))				return (String)entry.getKey();		}		if(inScopeNamespaces != null) {			for(Iterator i = inScopeNamespaces.entrySet().iterator(); i.hasNext(); ) {				Map.Entry entry = (Map.Entry)i.next();				if(entry.getValue().equals(uri))					return (String)entry.getKey();			}		}		return null;	}