commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar" <>
Subject Re: [Digester] Getting attribute from Rule begin method
Date Fri, 21 Apr 2006 15:21:15 GMT
On 4/21/06, Carlos Ruano Sánchez <> wrote:
> Thank you for your response!
> I'm not using any VariableSubstitutor so I think that's not the reason of my
> problem.
> I've tried again my code and I've got the same result: when I debug my
> program, I can see all the attributes with their values inside the
> Attributes object but when I try to get them, I get only nulls or empty
> strings.
> How do you get the attribute names and values? Maybe I'm not using the
> methods properly.

public CustomRule extends Rule {

  public final void begin(final String namespace, final String name,
                                  final Attributes attributes) throws
Exception {
         String foo = attributes.getValue("foo");
         // do something interesting with foo

  // and so on ...

Maybe try to write a simplest test case that doesn't work for you?


> Thanks!
> Carlos

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message