title: XML Parsing with Java: <element name ="doctype">
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4076910/how-to-retrieve-element-value-of-xml-using-java">how to retrieve element value of XML using Java?</a>  </p>
  </blockquote>
  
  
  
  <p>I am trying to parse a xml file with java using dom.
  The xml looks like this:</p>
  
  
  
  <pre><code>&lt;documents&gt;
    &lt;document&gt;
      &lt;element name="doctype"&gt;
        &lt;value&gt;Circular&lt;/value&gt;
      &lt;/element&gt;
    &lt;/document&gt;
  &lt;/documents&gt;
  </code></pre>
  
  <p>Geting the root node "documents" and also the child node "document" is easy. But I can't get the value of the element with the name "doctype" (I want to store the value "Circular" in a database). Can someone help me please?</p>