This allows the following:

 

 

<echo message=”Hello” />

<echo>Hello</echo>

<echo>

This is some stuff.

This is some more stuff that I want echoed on another line.

</echo>

<echo message=”ValidationException”>

This triggers a ValidationException because it has both inline content and the message attribute.

</echo>

<echo/> <!—This causes a blank message to be echoed just because I thought it was silly to not allow someone to do so if they really want to. -->

 

 

And I think I got the curly braces and non-tabs right this time.  J

 

Also, the use of ValidationException was my best guess as to the appropriate exception class to use.  Please someone inform me if this was a bad call on my part.

 

Any questions, critiques, suggestions, or “hey go and change this before we include it” are of course welcome.

 

Brian Deacon

 

 

p.s. – For my next trick, I saw that revamping the logging infrastructure was on the todo list.  Is anybody already on this?  I was gonna add support for a LogLevel enum, including –quiet, -debug, as well as –verbose that we have now.  Any thoughts?  Am I walking into an already-discussed consensus on how this ought to work? 

Attachment: EchoTask.zip
Description: Zip compressed data

Reply via email to