PluginCreateRule widgetPluginRule = new PluginCreateRule(Widget.class);
widgetPluginRule.setPluginIdAttribute(
"http://jakarta.apache.org/digester/plugins", "id");
widgetPluginRule.setPluginClassAttribute(
"http://jakarta.apache.org/digester/plugins", "class");
digester.addRule("root/widget", widgetPluginRule);
digester.addSetNext("root/widget", "addWidget");
PluginCreateRule gadgetPluginRule = new PluginCreateRule(Widget.class);
digester.addRule("root/gadget", gadgetPluginRule);
digester.addSetNext("root/gadget", "addGadget");