title: Parsin XML file using pugixml
body: <p>Hi
  I want to use XML file as a config file, from which I will read parameters for my application. I came across on PugiXML library, however I have problem with getting values of attributes. 
  My XML file looks like that</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;settings&gt;
      &lt;deltaDistance&gt; &lt;/deltaDistance&gt;
      &lt;deltaConvergence&gt;0.25 &lt;/deltaConvergence&gt; 
      &lt;deltaMerging&gt;1.0 &lt;/deltaMerging&gt; 
      &lt;m&gt; 2&lt;/m&gt;
      &lt;multiplicativeFactor&gt;0.7 &lt;/multiplicativeFactor&gt; 
      &lt;rhoGood&gt; 0.7 &lt;/rhoGood&gt;
      &lt;rhoMin&gt;0.3 &lt;/rhoMin&gt;
      &lt;rhoSelect&gt;0.6 &lt;/rhoSelect&gt;
      &lt;stuckProbability&gt;0.2 &lt;/stuckProbability&gt; 
      &lt;zoneOfInfluenceMin&gt;2.25 &lt;/zoneOfInfluenceMin&gt;
  &lt;/settings&gt;
  </code></pre>
  
  <p>To pare XML file I use this code </p>
  
  <pre><code>void ReadConfig(char* file)
  {
      pugi::xml_document doc;
      if (!doc.load_file(file)) return false;
  
      pugi::xml_node tools = doc.child("settings");
  
      //[code_traverse_iter
      for (pugi::xml_node_iterator it = tools.begin(); it != tools.end(); ++it)
      {
          cout&lt;&lt;it-&gt;name() &lt;&lt;    " " &lt;&lt;    it-&gt;attribute(it-&gt;name()).as_double();  
      }
  
  }
  </code></pre>
  
  <p>and I also was trying to use this</p>
  
  <pre><code>void ReadConfig(char* file)
  {
      pugi::xml_document doc;
      if (!doc.load_file(file)) return false;
  
      pugi::xml_node tools = doc.child("settings");
  
      //[code_traverse_iter
      for (pugi::xml_node_iterator it = tools.begin(); it != tools.end(); ++it)
      {
          cout&lt;&lt;it-&gt;name() &lt;&lt;    " " &lt;&lt;    it-&gt;value();
      }
  
  }
  </code></pre>
  
  <p>Attributes are loaded corectly , however all values are equals 0. Could somebody tell me what I do wrong ?</p>