Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 5919 invoked from network); 15 Feb 2005 18:12:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 15 Feb 2005 18:12:43 -0000 Received: (qmail 30862 invoked by uid 500); 15 Feb 2005 18:12:39 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 30813 invoked by uid 500); 15 Feb 2005 18:12:38 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 30780 invoked by uid 99); 15 Feb 2005 18:12:38 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from smtp.selectica.com (HELO smtp.selectica.com) (4.21.57.12) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 15 Feb 2005 10:12:37 -0800 Received: from it-exch.selectica.com ([10.0.12.41]) by smtp.selectica.com (8.12.8/8.12.8) with ESMTP id j1FICZK7006865 for ; Tue, 15 Feb 2005 10:12:36 -0800 Received: by hq.selectica.com with Internet Mail Service (5.5.2653.19) id <1B6QZY1D>; Tue, 15 Feb 2005 10:12:37 -0800 Message-ID: From: "Gogineni, Pratima" To: "'Jakarta Commons Users List'" Subject: RE: [digester] Portion of configuration handled by a different pr ocessor. Date: Tue, 15 Feb 2005 10:12:29 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Sorry about that I have now added digester in the subject. I think a custom rule class similar to the nodecreaterule will work in my scenario. The plugin still seems to assume that digester would be handling the rules for the plugin classes (even though we get the flexibility of adding these rules dynamically). Thanks Pratima -----Original Message----- From: Simon Kitching [mailto:skitching@apache.org] Sent: Monday, February 14, 2005 6:11 PM To: Jakarta Commons Users List Subject: Re: Portion of configuration handled by a different processor. Hi Pratima, On Mon, 2005-02-14 at 17:37 -0800, Gogineni, Pratima wrote: > Hi, > > I have a weird requirement that Im trying to figure out how to address with > the digester. Firstly, could you please prefix your email subject lines with [digester]? Because this is a list shared by multiple commons projects that makes life easier for everyone. > To Illustrate: > > > > > > > > > > > > I have rules created for config1, config2 and config3 tags in digester. when > I hit the tag - I would like to instantiate com.test.Handler1 and > pass the data under extrainfo as a "String" or "Reader" or "InputStream" to > the handler. > > It would be preferable to pass the current stream rather than a string to my > handler because i will also be processing the tags and would not like the > overhead of converting this to a string and then reparsing. I would suggest having a look at the CreateNodeRule, which can build a DOM representation of a section of the input. That DOM can then be passed to an arbitrary method on the top object on the digester stack for processing. If this doesn't suit, then I suggest you have a look at the source code for CreateNodeRule; you might get inspiration for how to code a custom Rule class of your own. Before doing any of that, though, I suggest looking at the "plugins" package for digester (esp. the package description page of the javadoc). It might just do what you want. Regards, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org