// for plugins at pattern "root/widget", use xml attributes "id" and
// "class" in the custom namespace as the values for plugin id and
// class, not the default (and non-namespaced) values of
// "plugin-id" and "plugin-class".
PluginCreateRule widgetPluginRule = new PluginCreateRule( Widget.class );
widgetPluginRule.setPluginIdAttribute( "http://commons.apache.org/digester/plugins", "id" );
widgetPluginRule.setPluginClassAttribute( "http://commons.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" );
MultiContainer root = new MultiContainer();
digester.push( root );