// and setup reader with this information.
if (!validation) {
XMLReaderObjectFactory.setReaderValidationMode(XMLReaderObjectFactory.VALIDATION_SETTING.DISABLED, reader);
} else if( colconfig!=null ) {
final VALIDATION_SETTING mode = colconfig.getValidationMode();
XMLReaderObjectFactory.setReaderValidationMode(mode, reader);
}
// Return configured reader.
return reader;
}