code: public static Digester newDigester(boolean xmlValidation,
  									   boolean xmlNamespaceAware, RuleSet rule, boolean blockExternal) {
  		Digester digester = new Digester();
  		digester.setNamespaceAware(xmlNamespaceAware);
  		digester.setValidating(xmlValidation);
  		digester.setUseContextClassLoader(true);
  		EntityResolver2 resolver = new LocalResolver(SERVLET_API_PUBLIC_IDS,
  				SERVLET_API_SYSTEM_IDS, blockExternal);
  		digester.setEntityResolver(resolver);
  		if (rule != null) {
  			digester.addRuleSet(rule);
  		}
  
  		return digester;
  	}
docs: Create a <code>Digester</code> parser.
  
  @param xmlValidation     turn on/off xml validation
  @param xmlNamespaceAware turn on/off namespace validation
  @param rule              an instance of <code>RuleSet</code> used for parsing the xml.
  @param blockExternal     turn on/off the blocking of external resources