title: Length of the Root Node in xml C++
body: <p>When I get the length of "Node", I am getting the length as 1. When I get the  </p>
  
  <p>"subnode" length I am getting as 1 as well. How is it possible? How can I </p>
  
  <p>differentiate both the nodes if it returns the same length.</p>
  
  <pre><code>&lt;Node&gt;
     &lt;Subnode&gt;xyz&lt;/Subnode&gt;
  &lt;/Node&gt;
  </code></pre>
  
  
  
  <pre><code>MSXML2::IXMLDOMNodeListPtr  pAttributeList = NULL;
  MSXML2::IXMLDOMNodeListPtr pNestedAttList = NULL;
  pIdRootNode-&gt;get_childNodes(&amp;pAttributeList);
  for (int iAttIndex = 0; iAttIndex &lt; pAttributeList-&gt;Getlength(); iAttIndex++)
  {
      MSXML2::IXMLDOMNodePtr pCurrentNode = pAttributeList-&gt;Getitem(iAttIndex);
      int l = pCurrentNode-&gt;GetchildNodes()-&gt;Getlength();
      //on each node check whether it has any child nodes and process those nested child properties too.
      if (l &gt; 1)
      {
  
      }
  }
  </code></pre>