title: Extract data from xml file in C#
body: <p>I need to extract data from a XML file for my project based on C#.
  The XML file is like this :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;Chemicals&gt;
      &lt;Titrates&gt;
          &lt;Titrate Name="Hydrochloric Acid" Basisity="1" Molarity="10" Normality="10" &gt;
              &lt;Experiments&gt;
                  &lt;Experiment Name="AcidBase"&gt;&lt;/Experiment&gt;
                  &lt;Experiment Name="Redox"&gt;&lt;/Experiment&gt;
            &lt;/Experiments&gt;
          &lt;/Titrate&gt;
          &lt;Titrate Name="Sulphuric Acid" Basisity="2" Molarity="20" Normality="50" &gt;
              &lt;Experiments&gt;
                  &lt;Experiment Name="AcidBase"&gt;&lt;/Experiment&gt;
              &lt;/Experiments&gt;
          &lt;/Titrate&gt;
          &lt;Titrate Name="Nitric Acid" Basisity="3" Molarity="50" Normality="40" &gt;
              &lt;Experiments&gt;
                 &lt;Experiment Name="AcidBase"&gt;&lt;/Experiment&gt;
              &lt;/Experiments&gt;
          &lt;/Titrate&gt;
      &lt;/Titrates&gt;
      &lt;Titrants&gt;
          &lt;Titrant Name="Sodium Hydroxide" Acidity="1" Molarity="10" Normality="20" &gt;
              &lt;Experiments&gt;
                 &lt;Experiment Name="AcidBase"&gt;&lt;/Experiment&gt;
              &lt;/Experiments&gt;
          &lt;/Titrant&gt;
          &lt;Titrant Name="Calcium Hydroxide" Acidity="1" Molarity="20" Normality="40" &gt;
              &lt;Experiments&gt;
                 &lt;Experiment Name="AcidBase"&gt;&lt;/Experiment&gt;
              &lt;/Experiments&gt;
          &lt;/Titrant&gt;
  
      &lt;/Titrants&gt;
      &lt;Indicators&gt;
          &lt;Indicator Name="Phenolphethalin" Color="Pink" &gt;
              &lt;Experiments&gt;
                  &lt;Experiment Name="AcidBase"&gt;&lt;/Experiment&gt;
              &lt;/Experiments&gt;
          &lt;/Indicator&gt;
          &lt;Indicator Name="Methyl Orange" Color="Orange" &gt;
              &lt;Experiments&gt;
                 &lt;Experiment Name="AcidBase"&gt;&lt;/Experiment&gt;
              &lt;/Experiments&gt;
          &lt;/Indicator&gt;
      &lt;/Indicators&gt;
  &lt;/Chemicals&gt;
  </code></pre>
  
  <p>As you can see, The chemicals are divided under titrants, titrates and indicators and then each chemical may be used in multiple experiments.
  The file is just a sample so, please ignore the chemistry aspect :P.
  So, for a particular experiment I need to extract the relevant data of all the chemicals that will be used in it.</p>
  
  <p>Example:</p>
  
  <p>For AcidBase Titration I would need the Name, Molarity, Basisity etc ( under titrates ) of the particular titrate. Same way for titrants and indicators whichever have AcidBase in their Experiment part.</p>