title: Accessing child XML elements iteratively with Ruby and Nokogiri
body: <p>I have an XML file similar to this:</p>
  
  <pre><code>&lt;Companies type="Container"&gt;
  &lt;Company type="Category"&gt;
      &lt;Name type="Property"&gt;Company 123&lt;/Name&gt;
      &lt;Location type="Property"&gt;New York&lt;/Location&gt;
      &lt;Employees type="Container"&gt;
          &lt;Employee type="Reference"&gt;
              &lt;Name type="Property"&gt;John Smith&lt;/Name&gt;
              &lt;Email type="Property"&gt;john@company.123&lt;/Email&gt;
          &lt;/Employee&gt;
          &lt;Employee type="Reference"&gt;
              &lt;Name type="Property"&gt;Jane Doe&lt;/Name&gt;
              &lt;Email type="Property"&gt;jane@company.123&lt;/Email&gt;
          &lt;/Employee&gt;
  &lt;/Company&gt;
  &lt;Company type="Category"&gt;
      &lt;Name type="Property"&gt;Company ABC&lt;/Name&gt;
      &lt;Location type="Property"&gt;Minneapolis&lt;/Location&gt;
      &lt;Employees type="Container"&gt;
          &lt;Employee type="Reference"&gt;
              &lt;Name type="Property"&gt;John Doe&lt;/Name&gt;
              &lt;Email type="Property"&gt;doe@company.abc&lt;/Email&gt;
          &lt;/Employee&gt;
          &lt;Employee type="Reference"&gt;
              &lt;Name type="Property"&gt;Jane Smith&lt;/Name&gt;
              &lt;Email type="Property"&gt;smith@company.abc&lt;/Email&gt;
          &lt;/Employee&gt;
  &lt;/Company&gt;
  </code></pre>
  
  <p></p>
  
  <p>I have to walk through this file and get all the information out so I can work with it. I can use Nokogiri to loop through and access each 'Company' and get the 'Name' and 'Location' properties just fine. What I can not figure out how to do, however, is to access the 'Employee' information for each 'Company'.</p>
  
  <p>I'm sure I am missing something simple, but I've been digging around within pry and I can not seem to demystify this. Help would be <em>greatly</em> appreciated.</p>