question: private static String validateXML ( String string ) throws IOException { for ( int i = 0 ; i < string . length ( ) ; i ++ ) { char ch = string . charAt ( i ) ; if ( ! ( ch == 9 || ch == 10 || ch == 13 || ch >= 32 ) ) throw new IOException ( "Character reference \"&#" + Integer . toString ( ch ) + "\" is an invalid XML character." ) ; } return string ; }
target:  Validates whether the given string only contains valid XML characters.