title: PHP: Xml with multiple sibling elements of the same name, maintain order
body: <p>I have an xml file which looks something like this:</p>
  
  <pre><code>&lt;items&gt;
       &lt;itemA/&gt;
       &lt;itemB/&gt;
       &lt;itemA/&gt;
       &lt;itemA/&gt;
       &lt;itemC/&gt;
   &lt;/items&gt;
  </code></pre>
  
  <p>but I need to process this using php and maintain the elements order.
  I understand how to access the elements with the same name using simplexml and array notation, but I cannot find a way to iterate through them all maintaining their order.</p>