code: public int getIndex(String uri, String localPart)
    {
      for(int i=m_attrs.getLength()-1;i>=0;--i)
      {
        Node a=m_attrs.item(i);
        String u=a.getNamespaceURI();
        if( (u==null ? uri==null : u.equals(uri))
        &&
        a.getLocalName().equals(localPart) )
      return i;
      }
      return -1;
    }
docs: Look up the index of an attribute by Namespace name.
  
  @param uri The Namespace URI, or the empty string if
  the name has no Namespace URI.
  @param localPart The attribute's local name.
  @return The index of the attribute, or -1 if it does not
  appear in the list.