Simon Kitching wrote:


Just on a side-note, I am not sure that your XML design is entirely
sound. To me,

<foo>1</foo>  means "here is a foo, with value 1".
<foo/> means "here is a foo, with no value".

You appear to want to pretend that <foo/> doesn't exist - which doesn't
seem right to me. If <foo/> has no meaning, then why is it in the input
at all?

Well, that's a good point. The only reason I would rather leave it in the input is that I am using the XML file as a user-friendly means of supplying data to my program. (Another alternative I had considered was a Preferences or Properties file, but I wanted to try Digester after hearing how good it is -- and it *is* good.)


Ideally I'd just give my users an empty XML file and say "go ahead and fill out the values that apply, but leave the ones that don't alone".

Regardless of the above digression, I think implementing a custom Rule
object should solve your problem.

Thanks Simon, I will investigate the Rule classes.




Erik


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to