2011/5/13 Patrick Diviacco <patrick.divia...@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-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org

Reply via email to