title: How to count elements in TinyXml?
body: <p>I think problem is with wrong using function or something else.</p>
  
  <p>This part of code is working but the result isn't well.</p>
  
  <pre><code>TiXmlElement* e = hDoc.FirstChildElement().Element(); // think problem is there
  while (e)
  {
      e = e-&gt;NextSiblingElement();  //or may be there
      count++;
  }
  </code></pre>
  
  <p>The result of count is 1.</p>
  
  <hr>
  
  <p>Xml file is:</p>
  
  <pre><code>&lt;doc&gt;
     &lt;state&gt; ... &lt;/state&gt;
     &lt;state&gt; ... &lt;/state&gt;
     ...
  &lt;/doc&gt;
  </code></pre>
  
  <p>Can't find work example.</p>