My digester has hit upon a pattern, which triggers a method in the top object on the call stack. Fine, that's normal. However, the method expects an integer argument and in my XML file the element representing this pattern is empty. This is throwing a SAXException, as expected.
There are several solutions:
1. Overload my method with a no-arg version. This doesn't seem like a good idea, changing my class structure simply to satisfy the digester, because a no-arg version would do nothing.
2. Not include the element at all if it does not contain a value, so that the digester doesn't see the pattern. This doesn't seem like a great solution either.
3. Use a dummy value (-1 in my case) and then have the method check for the dummy value. This still seems a little inelegant.
Hmm... I'm wondering if there's a way to tell the digester that I don't want to call that method if the element at the matching pattern is empty? Or is this getting too detailed, in which case I'd have to look into JDOM or something.
Thanks!
Erik
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
