commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlos Ruano Sánchez" <>
Subject Re: [Digester] Getting attribute from Rule begin method
Date Fri, 21 Apr 2006 14:45:44 GMT
Thank you for your response!

I'm not using any VariableSubstitutor so I think that's not the reason of my

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

How do you get the attribute names and values? Maybe I'm not using the
methods properly.



On 4/21/06, Simon Kitching <> wrote:
> Hi Carlos,
> On Fri, 2006-04-21 at 00:52 +0200, Carlos Ruano Sánchez wrote:
> > Hello!
> >
> > I'm creating my own rule in Digester (extending Rule class), and I can't
> > access the attribute list. When I try to obtain the information from the
> > Attributes object in begin method I get nothing (an empty string or
> null)
> > from the methods (getQName, getValue, etc.). getLength() returns cero.
> I'm
> > sure the XML tag has several attributes in my XML file and I've used the
> > Netbeans debugger to know what the Attributes object has and all the
> > attributes are saved inside the Attributes objects but the Attributes
> > methods don't return anything valid.
> >
> > What a mess! I hope I've explain it correctly. I can explain it again if
> you
> > want. Can anyone help me? Thank you very much in advance!
> Sorry, I have no idea why this isn't working for you. It definitely
> works for me.
> The VariableSubstitutor functionality does provide a "wrapper" around
> the real Attributes object. However (a) there are no bugs in this AFAIK,
> and (b) variable substitution stuff isn't enabled unless explicitly set
> up anyway.
> I can't think of any other possible cause for what you are seeing, other
> than that your rule is firing on some element other than the one you
> think it's matching.
> Regards,
> Simon
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message