title: Parse XML files Java with DOM
body: <p>I am currently developing a system that uses the following format of XML files to for configuration purposes:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Branch&gt;
      &lt;Department&gt;
          &lt;Door id="1" enabled="true"/&gt;
          &lt;Door id="2" enabled="true"/&gt;
      &lt;/Department&gt;
      &lt;Department&gt;
          &lt;Door id="3" enabled="true"/&gt;
          &lt;Door id="4" enabled="false"/&gt;
      &lt;/Department&gt;
      &lt;Department&gt;
          ....
  &lt;/Branch&gt;
  </code></pre>
  
  <p>Do you know how could I parse this XML file?</p>
  
  <p>I have been looking for other answers but I could only get it to work till the Department node. It isn't interpreting the Door node level.</p>