Code example for NamespaceContext

Methods: getNamespaceURI

0
    } 
 
    public String getNamespaceURI(String prefix) {
        String answer = map.get(prefix);
        if (answer == null && parent != null) {
            return parent.getNamespaceURI(prefix);
        } 
        return answer;
    } 
 
    public String getPrefix(String namespaceURI) {
        for (Entry<String, String> entry : map.entrySet()) {
            if (namespaceURI.equals(entry.getValue())) {
                return entry.getKey();
            } 
        } 
        if (parent != null) {
            return parent.getPrefix(namespaceURI);
        } 
        return null; 
Contextual code suggestions in your IDE  Get Codota for Java