title: Parsing XML file In java using DOM
body: <p>I want to parse XML file to read values of certain elements in the file.</p>
  
  <pre><code>&lt;row&gt;
  &lt;element&gt;
   &lt;status&gt;OK&lt;/status&gt;
  &lt;duration&gt;
   &lt;value&gt;499&lt;/value&gt;
   &lt;text&gt;8 mins&lt;/text&gt;
   &lt;/duration&gt;
   &lt;distance&gt;
   &lt;value&gt;3208&lt;/value&gt;
   &lt;text&gt;3.2 km&lt;/text&gt;
  &lt;/distance&gt;
  &lt;/element&gt;
  &lt;element&gt;
   &lt;status&gt;OK&lt;/status&gt;
   &lt;duration&gt;
   &lt;value&gt;501&lt;/value&gt;
  &lt;text&gt;8 mins&lt;/text&gt;
   &lt;/duration&gt;
  &lt;distance&gt;
  &lt;value&gt;2869&lt;/value&gt;
  &lt;text&gt;2.9 km&lt;/text&gt;
  &lt;/distance&gt;
  &lt;/element&gt;
  &lt;element&gt;
  &lt;status&gt;OK&lt;/status&gt;
  &lt;duration&gt;
  &lt;value&gt;788&lt;/value&gt;
   &lt;text&gt;13 mins&lt;/text&gt;
  &lt;/duration&gt;
  &lt;distance&gt;
  &lt;value&gt;6718&lt;/value&gt;
  &lt;text&gt;6.7 km&lt;/text&gt;
  &lt;/distance&gt;
  &lt;/element&gt;
  &lt;/row&gt;
  </code></pre>
  
  <p>I want to able to read the values  of all "value" tags under "distance" tags. I have done the basic code to read XML data. I just want the idea to read the value of elements at the third level</p>