title: Read XML File in Spark with multiple RowTags
body: <p>I would like to read a huge XML File with 3 different RowTags into Apache Spark Dataframes.</p>
  
  <p>RowTag = The XML Element, which you interpret as a row in Spark.</p>
  
  <p>The Tags</p>
  
  <ul>
  <li>contain different data Structures </li>
  <li>are not overlapping</li>
  </ul>
  
  <p>xml-spark (<a href="https://github.com/databricks/spark-xml" rel="nofollow noreferrer">https://github.com/databricks/spark-xml</a>) only offers to Read one RowTag a time, so I would need to read the same File 3 Times (not efficient).</p>
  
  <p>Is there any way to read the file in one read ?</p>
  
  <p><strong>Details:</strong></p>
  
  <p>I have a huge XML File (24 GB) which contain 3 Lists:</p>
  
  <pre><code>&lt;myFile&gt;
      &lt;ContainedResourceList&gt;
          &lt;SoundRecording&gt;&lt;Title&gt;A&lt;/Title&gt;&lt;/SoundRecording&gt;
        ... several million records ...
          &lt;SoundRecording&gt;&lt;Title&gt;Z&lt;/Title&gt;&lt;/SoundRecording&gt;
      &lt;/ContainedResourceList&gt;
  
      &lt;ContainedReleaseList&gt;
          &lt;Release&gt;&lt;ReleaseType&gt;Single&lt;/ReleaseType&gt;&lt;/Release&gt;
        ... several million records ...
          &lt;Release&gt;&lt;ReleaseType&gt;LP&lt;/ReleaseType&gt;&lt;/Release&gt;
      &lt;/ContainedReleaseList&gt;
  
      &lt;ContainedTransactionList&gt;
          &lt;Transaction&gt;&lt;Sales&gt;1&lt;/Sales&gt;&lt;/Transaction&gt;
        ... several million records ...
          &lt;Transaction&gt;&lt;Sales&gt;999&lt;/Sales&gt;&lt;/Transaction&gt;
      &lt;/ContainedTransactionList&gt;
  &lt;/myFile&gt;
  </code></pre>
  
  <p>The XML File is valid.
  I want to read the RowTags SoundRecording, Release &amp; Transaction.</p>
  
  <p>I would prefer Scala libs, but I would be happy for any lib enabling the read. </p>
  
  <p><strong>PS:</strong>
  How could the output &amp; his schema look like ?</p>
  
  <ul>
  <li>Best Option: An Array of 3 DataFrames, one for each RowTag</li>
  <li>Ugly Option: One DataFrame containing the possible elements of all the 3 datastructures</li>
  </ul>