title: Obtain value stored within a set of attributes of a given type
body: <p>I have the Following XML File , How can I obtain the value stored within the  tags of a given type (In this Case say of type "FileModel") 
  .. How can I write some code which will get me the values Rep1 and Rep2 . I need these values to run a certain validation in a method </p>
  
  <p>How can I achieve this ?</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;MainClass xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;Items&gt;
      &lt;Settings xsi:type="FileModel"&gt;
        &lt;Name&gt;Rep1&lt;/Name&gt;
        &lt;IsActive&gt;true&lt;/IsActive&gt;
        &lt;IsHidden&gt;false&lt;/IsHidden&gt;
      &lt;/Settings&gt;
      &lt;Settings xsi:type="FileModel"&gt;
        &lt;Name&gt;Rep2&lt;/Name&gt;
        &lt;IsActive&gt;true&lt;/IsActive&gt;
        &lt;IsHidden&gt;false&lt;/IsHidden&gt;
      &lt;/Settings&gt; 
     &lt;Settings xsi:type="ServerModel"&gt;
        &lt;Name&gt;DelRep&lt;/Name&gt;
        &lt;IsActive&gt;false&lt;/IsActive&gt;
        &lt;IsHidden&gt;false&lt;/IsHidden&gt;
      &lt;/Settings&gt;
    &lt;/Items&gt;
  &lt;/MainClass&gt;
  </code></pre>