private boolean validate(final String xmlFile, final SAXReader reader) throws IOException {
		XMLErrorHandler errorHandle = new XMLErrorHandler();// 错误处理类实例
		reader.setErrorHandler(errorHandle);// 向 XML 阅读器注册一个实例
//		File file = new File(xmlFile);
		InputStream is = null;
//		if (file.exists() && file.isFile()) {
		try {
			is = this.getClass().getResourceAsStream(xmlFile);// 读取xml
			//is =new FileInputStream(xmlFile);// 读取xml
			InputStreamReader in = new InputStreamReader(is, "utf-8");
			reader.read(in);
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
			return false;
		} catch (DocumentException e) {
			e.printStackTrace();
			return false;
		}
//		} else {
//			return false;
//		}

		if (errorHandle.getErrors().hasContent()) {// 如果错误处理类实例中包含错误信息返回false;
			ByteArrayOutputStream out = new ByteArrayOutputStream();
			XMLWriter errorWriter = new XMLWriter(out, OutputFormat.createPrettyPrint());
			errorWriter.write(errorHandle.getErrors());
			String sErrorMsg = new String(out.toByteArray(), "UTF-8");
			System.out.println(sErrorMsg);
		}

		return true;
	}