public static Boolean StringToBoolean(String str) throws Exception {
  if (str == null) {
    return null;
  }
  if (str.equals("true") || str.equals("1")) {
    return Boolean.TRUE;
  }
  if (str.equals("false") || str.equals("0")) {
    return Boolean.FALSE;
  }
  throw new Exception();
}

public static Boolean StringToBoolean ( String str ) throws Exception { if ( str == null ) { return null ; } if ( str . equals ( "true" ) || str . equals ( "1" ) ) { return Boolean . TRUE ; } if ( str . equals ( "false" ) || str . equals ( "0" ) ) { return Boolean . FALSE ; } throw new Exception ( ) ; }
converts a value of xml boolean type to boolean object .
