本文整理匯總了Java中org.apache.commons.digester.Digester.setRules方法的典型用法代碼示例。如果您正苦於以下問題:Java Digester.setRules方法的具體用法?Java Digester.setRules怎麽用?Java Digester.setRules使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.commons.digester.Digester
的用法示例。
在下文中一共展示了Digester.setRules方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: DdlUtilsDataHandling
import org.apache.commons.digester.Digester; //導入方法依賴的package包/類
/**
* Creates a new data handling object.
*/
public DdlUtilsDataHandling()
{
_digester = new Digester();
_digester.setEntityResolver(new EntityResolver() {
public InputSource resolveEntity(String publicId, String systemId)
{
// we don't care about the DTD for data files
return new InputSource(new StringReader(""));
}
});
_digester.setNamespaceAware(true);
_digester.setValidating(false);
_digester.setUseContextClassLoader(true);
_digester.setRules(new ExtendedBaseRules());
_digester.addRuleSet(new DataRuleSet());
}
示例2: buildDigester
import org.apache.commons.digester.Digester; //導入方法依賴的package包/類
/**
* @return fully-initialized Digester used to process entry XML files
*/
protected Digester buildDigester(String schemaLocation, String digestorRulesFileName) {
Digester digester = new Digester();
digester.setNamespaceAware(false);
digester.setValidating(true);
digester.setErrorHandler(new XmlErrorHandler());
digester.setSchema(schemaLocation);
Rules rules = loadRules(digestorRulesFileName);
digester.setRules(rules);
return digester;
}
示例3: buildDigester
import org.apache.commons.digester.Digester; //導入方法依賴的package包/類
/**
* @return fully-initialized Digester used to process entry XML files
*/
private Digester buildDigester(String schemaLocation, String digestorRulesFileName) {
Digester digester = new Digester();
digester.setNamespaceAware(false);
digester.setValidating(true);
digester.setErrorHandler(new XmlErrorHandler());
digester.setSchema(schemaLocation);
Rules rules = loadRules(digestorRulesFileName);
digester.setRules(rules);
return digester;
}