title: IF...THEN...ELSE using XML
body: <p>I have a program that uses XML formatted rules to create executable code for run-time. I have to define some actions and logical constructs using my own dialect. I have OR, AND, and NOT constructs and now I need to implement IF..THEN..ELSE.</p>
  
  <p>I'm trying to come up with a syntax that would make sense and here's what I have so far:</p>
  
  <pre><code>&lt;IF id='if-1'&gt;
      &lt;TIME from="5pm" to="9pm" /&gt;
  &lt;/IF&gt;
  &lt;THEN id='if-1'&gt;
      &lt;...some actions defined.../&gt;
  &lt;/THEN&gt;
  &lt;ELSE id='if-1'&gt;
      &lt;...other set of actions defined here.../&gt;
  &lt;/ELSE&gt;
  </code></pre>
  
  <p>If looks difficult to read to me, but I don't see a cleaner way to represent this without doing too much nesting. Does anyone have a suggestion? (not using XML is not an option at this point in time :) )</p>