commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Diviacco <patrick.divia...@gmail.com>
Subject Re: [digester] how can I print children tags instead of only tag content ?
Date Sat, 14 May 2011 18:58:01 GMT
Thanks,

1) Is there any tutorial explaining how to use it ?

2) In my case, if I have more than one child, is the pattern detected
multiple times ?

help is very appreciated!




On 14 May 2011 01:36, Simone Tripodi <simonetripodi@apache.org> wrote:

> Hi Patrick,
> follow the Konstantin's suggestion, that's the way to achieve it. Have
> a read also to
> http://commons.apache.org/digester/apidocs/index.html?org/apache/commons/digester/SimpleRegexMatcher.html
>
> HTH,
> Simo
>
> http://people.apache.org/~simonetripodi/
> http://www.99soft.org/
>
>
>
> On Fri, May 13, 2011 at 8:28 PM, Konstantin Kolinko
> <knst.kolinko@gmail.com> wrote:
> > 2011/5/13 Patrick Diviacco <patrick.diviacco@gmail.com>:
> >> mhm, sorry.. just to be more clear.
> >>
> >> Is there a way in Commons Digester to trigger a method only if a xml
> element
> >> has a child ?
> >>
> >> i.e.
> >> digester.addCallMethod("collection/doc/categ/*",  "myMethod", 0);
> >>
> >> This doesn't work.
> >
> > The "*" is allowed in the prefix only, as documented in
> >
> >
> http://commons.apache.org/digester/commons-digester-2.1/docs/api/org/apache/commons/digester/RulesBase.html
> >
> > You may try to use a different rules matcher. See "RegexMatchers" chapter
> here:
> > http://commons.apache.org/digester/commons-digester-2.1/core.html
> >
> >
> >> But it is actually what I need. If element <categ> has at
> >> least a child, then trigger myMethod
> >
> > Best regards,
> > Konstantin Kolinko
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> > For additional commands, e-mail: user-help@commons.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

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