title: How to parse xml with simple-xml library ,where data is list and consist of different types of list?
body: <p>I  am using simple-xml library to parse xml,where data is list which contains list of different types, data consist of list of images and list of videos,here is xml I represent my java class like this</p>
  
  <pre><code>@ElementList(required = false, name = "data")
  public ArrayList&lt;Data&gt; data;
  public class Data {
  public String link;
  public String url;}
  </code></pre>
  
  <p>It works ,while I want to map my xml to this class</p>
  
  <pre><code>public class Data{
  public ArrayList&lt;Image&gt;images;
  public ArrayList&lt;Video&gt;videos;}
  
  &lt;data&gt;
        &lt;image&gt;
          &lt;link&gt;&lt;/link&gt;
          &lt;mask&gt;&lt;/mask&gt;
        &lt;/image&gt;
        &lt;image&gt;
          &lt;link&gt;&lt;/link&gt;
          &lt;mask&gt;&lt;/mask&gt;
        &lt;/image&gt;
        &lt;video&gt;
          &lt;url&gt;&lt;/url&gt;
          &lt;mask&gt;&lt;/mask&gt;
        &lt;/video&gt;
        &lt;video&gt;
          &lt;url&gt;&lt;/url&gt;
          &lt;mask&gt;&lt;/mask&gt;
        &lt;/video&gt; &lt;/data&gt;
  </code></pre>