title: Elegant way to read business rules stored in XML file
body: <p>I have to read business rules stored in XML file (I am using VC++/MFC/MSXML). XML consists of rules. Each rule has a set of conditions and actions. What would be an elegant OOP design for such system? What design patterns would you use if you where a designer of such system?</p>
  
  <p>update:<br>
  Rules are put in sequence and executed one buy one if all conditions of rule are met.</p>
  
  <p>example of xml:  </p>
  
  <pre><code>
     &lt;rules&gt;
        &lt;!--  rule no. 1 --&gt;
        &lt;rule name="rule no. 1"&gt;
           &lt;conditions&gt;
              &lt;condition name="condition no. 1" type="ATTR_EMPTY"&gt;
                 &lt;parameters&gt;
                    &lt;parameter name="attribute_name"&gt;ttt&lt;/parameter&gt;
                    &lt;parameter name="workflow_id"&gt;3&lt;/parameter&gt;
                    &lt;parameter name="workflow_state_id"&gt;5&lt;/parameter&gt;
                 &lt;/parameters&gt;
              &lt;/condition&gt;
              &lt;condition name="condition no. 2" type="ATTR_EMPTY"&gt;
                 &lt;parameters&gt;
                    &lt;parameter name="attribute_name"&gt;ttt&lt;/parameter&gt;
                    &lt;parameter name="enviroment_id"&gt;3&lt;/parameter&gt;
                 &lt;/parameters&gt;
              &lt;/condition&gt;
           &lt;/conditions&gt;
           &lt;actions&gt;
              &lt;action name="action no. 1" type="ATTR_CLEAR"&gt;
                 &lt;parameters&gt;
                    &lt;parameter name="attribute_name"&gt;ttt&lt;/parameter&gt;
                 &lt;/parameters&gt;
              &lt;/action&gt;
           &lt;/actions&gt;
        &lt;/rule&gt;
     &lt;/rules&gt;
  </code></pre>