本文整理汇总了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;
}