title: How to load xml file using apache commons configuration (java)?
body: <p>This is my java project strucutre</p>
  
  <pre><code>src/main/java
    |_LoadXml.java
  src/main/resources/
    |_config.xml
  src/test/java
  src/test/resources
  </code></pre>
  
  <p>I want to load the following xml file using apache-common configuration library.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"&gt;
  &lt;properties&gt;
  &lt;comment&gt;Here are some favorites&lt;/comment&gt;
  &lt;entry key="favoriteSeason"&gt;summer&lt;/entry&gt;
  &lt;entry key="favoriteFruit"&gt;pomegranate&lt;/entry&gt;
  &lt;entry key="favoriteDay"&gt;today&lt;/entry&gt;
  &lt;/properties&gt;
  </code></pre>
  
  <p>I have written the following code snippet for LoadXml.java</p>
  
  <pre><code>public static void configure() {
      try {
         XMLConfiguration config = new XMLConfiguration("config.xml");
          node = config.getRootElementName();
      } catch (ConfigurationException e) {
          e.printStackTrace();
      }
      return;
  }
  </code></pre>
  
  <p>I want to load xml keys and values into a map with hierarchy nodes seperated by a "."(dot). It would be greatly helpful if someone can help me in this regard.</p>