import com.sun.org.apache.xerces.internal.impl.Constants;
Constants类在%JAVA_HOME%/jre/lib/rt.jar包中
try{
File file = new File(absoluteDbConfigFile);
Reader reader = new InputStreamReader(new FileInputStream(file),"utf-8");
SAXReader sax = new SAXReader();
sax.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.LOAD_EXTERNAL_DTD_FEATURE, false); //设置不需要校验头文件
document = sax.read(reader);
root = document.getRootElement().element("session-factory");
buildCache();
}catch(FileNotFoundException e){
//e.printStackTrace();
}catch(Exception e){
//e.printStackTrace();
}