title: How to get the value label of store config fields with source models
body: <p>I'm trying to iterate over each config field to get the value of every field for each scope level. Here's the code so far:</p>
  
  <p>$path will be an array of config paths like 'general/country/default', 'general/country/allow', 'general/region/display_all', etc. The function below will iterate over each $path element.</p>
  
  <pre><code>$value = Mage::getConfig()-&gt;getNode($path, 'default');
  
  // ...
  
  foreach (Mage::app()-&gt;getWebsites() as $website) {
      $value = Mage::getConfig()-&gt;getNode($path, 'website', $website-&gt;getCode());
  
      // ...
  
      foreach ($website-&gt;getGroups() as $group) {                
          foreach ($group-&gt;getStores() as $store) {
              $value = Mage::getConfig()-&gt;getNode($path, 'store', $store-&gt;getCode());
  
              // ...
  
          }
      }
  }
  </code></pre>
  
  <p>This works fine except on dropdowns and other fields. On a Yes/No dropdown it will return 1/0 instead of Yes/No. On a country dropdown it will return US instead of United States, etc.</p>
  
  <p>I'm pretty sure I need to run the returned values through the source model but I don't know how to get the source model for each $path programmatically? </p>
  
  <p>Or maybe there's another way... </p>