static String parsePrefix(String key){
  if (key == null)   return null;
  boolean inquotes=false;
  for (int i=0; i < key.length(); i++) {
    char c=key.charAt(i);
    if (c == '"') {
      inquotes=!inquotes;
    }
 else     if ((c == '[' || c == '.') && !inquotes) {
      return key.substring(0,i);
    }
  }
  return null;
}

static String parsePrefix ( String key ) { if ( key == null ) return null ; boolean inquotes = false ; for ( int i = 0 ; i < key . length ( ) ; i ++ ) { char c = key . charAt ( i ) ; if ( c == '"' ) { inquotes = ! inquotes ; } else if ( ( c == '[' || c == '.' ) && ! inquotes ) { return key . substring ( 0 , i ) ; } } return null ; }
internal method to parse a style prefix .
