title: XML Parsing and deserialization
body: <p>I have a xml file which Im reading it from my class</p>
  
  <pre><code>&lt;Testclasses&gt;
  &lt;Class&gt;new SomeClass1()&lt;/class&gt;
  &lt;class&gt;new SomeClass2()&lt;/class&gt;
  &lt;/Testclasses&gt;
  </code></pre>
  
  <p>so i have a method in the class which takes an argument as an object as below</p>
  
  <pre><code>public List&lt;Object&gt; retriveValuesFromXml(){
      ....
      This method parses the values from xml and reads the different object and returns a
      list of objects.
  }
  
  @Test
  public void someMethod1(){
  
     ArrayList&lt;Object&gt; list_of_objects= retriveValuesFromXml();
  
     for(Object x :list_of_objects){
        someMethod2(x); //for example : x = new SomeClass1() or x = new SomeClass2()
     }
  }
  
  public void someMethod2(Object target){
     .....
  }
  </code></pre>
  
  <p>where target is the new SomeClass() object created, which we are reading from the xml. Can i know how to parse the xml values from the file as an object and store it in the list? I just want to use list of all the class objects in my project and send them to this test class. later even if any new classes get added to the project i should be able to add to this xml file and pass the class object to this test.</p>