/** * Process the beginning of this element. * * @param namespace is the namespace this attribute is in, or null * @param name is the name of the current xml element * @param attributes is the attribute list of this element */ public void begin(String namespace, String name, Attributes attributes) throws Exception { Rules oldRules = digester.getRules(); AnyChildRule anyChildRule = new AnyChildRule(); anyChildRule.setDigester(digester); AnyChildRules newRules = new AnyChildRules(anyChildRule); newRules.init(digester.getMatch()+"/", oldRules); digester.setRules(newRules); }
/** * This is only invoked after all child elements have been processed, * so we can remove the custom Rules object that does the * child-element-matching. */ public void body(String bodyText) throws Exception { AnyChildRules newRules = (AnyChildRules) digester.getRules(); digester.setRules(newRules.getOldRules()); }
public List<Rule> match(String matchPath) { return match(null,matchPath); }
/** * Process the beginning of this element. * * @param namespace is the namespace this attribute is in, or null * @param name is the name of the current xml element * @param attributes is the attribute list of this element */ @Override public void begin(String namespace, String name, Attributes attributes) throws Exception { Rules oldRules = digester.getRules(); AnyChildRule anyChildRule = new AnyChildRule(); anyChildRule.setDigester(digester); AnyChildRules newRules = new AnyChildRules(anyChildRule); newRules.init(digester.getMatch()+"/", oldRules); digester.setRules(newRules); }
public List<Rule> match(String matchPath) { return match(null,matchPath); }
/** * This is only invoked after all child elements have been processed, * so we can remove the custom Rules object that does the * child-element-matching. */ @Override public void body(String bodyText) throws Exception { AnyChildRules newRules = (AnyChildRules) digester.getRules(); digester.setRules(newRules.getOldRules()); }