@Override
    public int getIndex(String xmlName) {
        int length = getLength();

        for (int i = 0; i < length; i++) {
            if (getQName(i).equals(xmlName)) {
                return i;
            }
        }
        return -1;
    }
@ Override public int getIndex ( String xmlName ) { int length = getLength ( ) ; for ( int i = 0 ; i < length ; i ++ ) { if ( getQName ( i ) . equals ( xmlName ) ) { return i ; } } return - 1 ; }
<b>SAX2 Attributes</b> method (don't invoke on parser);