On Fri, 2007-08-10 at 10:44 -0500, ying lcs wrote:
> Hi,
> 
> I have a class like this:
> 
> public class Constants {
>    public static int  parameter =  1;
> }
> 
> How can i use digester rule to set the value of parameter of Constants?

Write your own rule implementation, ie your own subclass of the abstract
Rule class.

Assuming you want to use an xml attribute to specify the new parameter
value, you'll just need to override the method:
  public void begin(ns, name, attrs)

If you want the new value to be in the body of an xml element, then
instead override
  public void body(ns, name, text)

Regards,

Simon



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to