title: How to iterate over childnodes in boost::propertytree, if these have childs itself?
body: <p>I load a boost::property_tree::ptree from an XML-file, that looks somewhat like this:</p>
  
  <pre><code>&lt;bla&gt;
     &lt;foo&gt;
         &lt;element id="1" type="..." path="..."/&gt;
         &lt;element id="2" type="..." path="..."/&gt;
         &lt;element id="3" type="..." path="..."/&gt;
         &lt;otherelement/&gt;
     &lt;/foo&gt;
  &lt;/bla&gt;
  </code></pre>
  
  <p>I load that into a property-tree with read_xml. Now I want to build a vector containing structs, that resemble the <code>element</code>-tags. I can do the following:</p>
  
  <pre><code>BOOST_FOREACH(ptree::value_type&amp; node, tree.get_child("bla.foo"))
  {
      if (node.first == "element")
      {
                   ...
      }
  }
  </code></pre>
  
  <p>So far it's good, but I have problems to get the data in the element. <code>node.second</code> should contain that, but how do I access it properly? <code>node.second.get("xmlattr.type")</code> don't work.</p>