Code example for NamespaceContext

Methods: getNamespaceURI

0
        if (index < 1 || index == text.length() - 1) {
            // unqualified form - use the default supplied 
            return new QName(defaultNamespace, text);
        } else { 
            String prefix = text.substring(0, index);
            String uri = context.getNamespaceURI(prefix);
            String localPart = text.substring(index + 1);
            return new QName(uri, localPart, prefix);
        } 
    } 
 
    /** 
     * Advances to the next tag in the stream according to the semantics of {@link XMLStreamReader#nextTag()} with the additional behavior that 
     * characters, spaces, comments, CDATA, and processing instructions will be recorded on the model object. 
     * 
     * @param type   the model object 
     * @param reader the stream 
     * @return the next tag value 
     * @throws XMLStreamException if a parsing error occurs 
     */ 
Connect your IDE to all the code out there  Get Codota for Java