question: private static boolean checkAttributeCharacters ( String chars ) throws CharConversionException { boolean escape = false ; for ( int i = 0 ; i < chars . length ( ) ; i ++ ) { char ch = chars . charAt ( i ) ; if ( ch <= 93 ) { switch ( ch ) { case 0x9 : case 0xA : case 0xD : continue ; case '\'' : case '"' : case '<' : case '&' : escape = true ; continue ; default : if ( ch < 0x20 ) { throw new CharConversionException ( "Invalid XML character &#" + ( ( int ) ch ) + ";." ) ; } } } } return escape == false ; }
target:  Check if all passed characters match XML expression [2].