Code example for NamespaceContext

Methods: getNamespaceURI

0
            throws ParseException 
    { 
        String res = null;
        try { 
            NamespaceContext ctxt = myParser.getNamespaceContext();
            res = ctxt.getNamespaceURI(prefix);
        } 
        catch ( IllegalArgumentException ex ) {
            parseError("Prefix '" + prefix + "' not bound", ex);
        } 
        return res;
    } 
 
    /** 
     * @return the current event type. 
     */ 
    public int getEventType() 
    { 
        return myParser.getEventType();
    }