dom4j不校验DTD

			EntityResolver resolver = new EntityResolver() {
			    public InputSource resolveEntity(String publicId, String systemId) {
			    	 return new InputSource(new StringBufferInputStream(""));
			    }
			};
			
			SAXReader saxReader = new SAXReader();
			saxReader.setEntityResolver( resolver);
			Document document1 = saxReader.read(new File("D:\\howard\\workspace_newmbs\\portaltest\\src\\org\\a.xml")); 
			

你可能感兴趣的:(dom4j)