@ Override public String getPrefix ( String namespaceURI ) { // per javax.xml.namespace.NamespaceContext doc if ( namespaceURI == null ) throw new IllegalArgumentException ( "Cannot find prefix for null namespace URI" ) ; if ( XMLConstants . XML_NS_URI . equals ( namespaceURI ) ) return XMLConstants . XML_NS_PREFIX ; if ( XMLConstants . XMLNS_ATTRIBUTE_NS_URI . equals ( namespaceURI ) ) return XMLConstants . XMLNS_ATTRIBUTE ; for ( Map . Entry < String , String > entry : bindings . entrySet ( ) ) { if ( namespaceURI . equals ( entry . getValue ( ) ) ) return entry . getKey ( ) ; } return null ; }
Returns the prefix for a namespace binding .