title: How to extract values of inner elements using SAXParser
body: <p>I have a xml file as below:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;RULES&gt;
      &lt;RULE DESCRIPTION="" DOMAIN="CAE" NAME="Filter1 " TYPE="FILTER"&gt;
          &lt;ATTRS&gt;
              &lt;ATTR RULE_NAME="myFilter1" /&gt;
          &lt;/ATTRS&gt;
      &lt;/RULE&gt;
  
      &lt;RULE DESCRIPTION="" DOMAIN="CAE" NAME="Skip1" TYPE="SKIP"&gt;
          &lt;ATTRS&gt;
              &lt;ATTR RULE_NAME="mySkip1" /&gt;
          &lt;/ATTRS&gt;
      &lt;/RULE&gt;
  
      &lt;RULE DESCRIPTION="" DOMAIN="CAE" NAME="Filter_new " TYPE="FILTER"&gt;
          &lt;ATTRS&gt;
              &lt;ATTR RULE_NAME="myFilter1" /&gt;
          &lt;/ATTRS&gt;
      &lt;/RULE&gt;
  
      &lt;RULE DESCRIPTION="" DOMAIN="CAE" NAME="Skip_new" TYPE="SKIP"&gt;
          &lt;ATTRS&gt;
              &lt;ATTR RULE_NAME="mySkip1" /&gt;
          &lt;/ATTRS&gt;
      &lt;/RULE&gt;
  &lt;/RULES&gt;
  </code></pre>
  
  <p>How can I parse this file using SAXParser (in C++) such that I am able to extract the value of RULE_NAME attribute only if the TYPE attribute has a value "FILTER".</p>
  
  <p>I can do this using the DOMParser but I would like to use SAXParser.</p>