title: LOAD XML INFILE from inconsistant XML file
body: <p>How can I use  LOAD XML INFILE on an xml like this one. I tried to loop through it with simplexml_load_file in php, but this file is so huge that the script stopped running after a few hours. I have no clue how to use LOAD XML INFILE. I did try to read the documentation but couldn't figure out how it works in my case where there are multiple category fields in each item and they're all named the same.</p>
  
  <pre><code>&lt;item&gt;
      &lt;id&gt;1&lt;/id&gt;
      &lt;category&gt;
          &lt;id&gt;1&lt;/id&gt;
          &lt;name&gt;Accessories&lt;/name&gt;
      &lt;/category&gt;
      &lt;category&gt;
          &lt;id&gt;15&lt;/id&gt;
          &lt;name&gt;Home Accessories&lt;/name&gt;
      &lt;/category&gt;
  &lt;/item&gt;
  &lt;item&gt;
      &lt;id&gt;2&lt;/id&gt;
      &lt;category&gt;
          &lt;id&gt;13&lt;/id&gt;
          &lt;name&gt;Tools&lt;/name&gt;
      &lt;/category&gt;
      &lt;category&gt;
          &lt;id&gt;39&lt;/id&gt;
          &lt;name&gt;Power Tools&lt;/name&gt;
      &lt;/category&gt;
      &lt;bullet&gt;
          &lt;point&gt;Will cut plywood, OSB, paneling and finish cut pine&lt;/point&gt;
          &lt;seqNbr&gt;10&lt;/seqNbr&gt;
      &lt;/bullet&gt;
      &lt;bullet&gt;
          &lt;point&gt;Smooth celcon slider locks blade in position&lt;/point&gt;
          &lt;seqNbr&gt;40&lt;/seqNbr&gt;
      &lt;/bullet&gt;
  &lt;/item&gt;
  </code></pre>
  
  <p>Also some items have additional fields like attributes and bullet points, and they're not consistent, meaning one can have 2 attributes and another will have 10.  </p>