commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar" <rahul.akol...@gmail.com>
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 <ruanonline@gmail.com> 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.
>
<snip/>

<pseudo>
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 ...
}
</pseudo>

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

-Rahul


> Thanks!
>
> Carlos
>
<snap/>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message