title: Java parse plist file
body: <p>I need to read a <code>.plist</code> file in <code>Java</code> and extract information from it. 
  I found a solution on stackoverflow (<a href="https://stackoverflow.com/questions/7484163/how-to-parse-plist-file-in-java">This solution</a>) and adjusted it to Commons Configuration 2.x. 
  My code: </p>
  
  <pre><code>public void parsePlist(File f) throws ConfigurationException, FileNotFoundException {
          XMLPropertyListConfiguration plist = new XMLPropertyListConfiguration();
          // load plist from classoath
          BufferedReader br = new BufferedReader(new FileReader(f));
          plist.read(br);
          Iterator&lt;String&gt; keys = plist.getKeys("dictionary");
          while (keys.hasNext()) {
              // do someting with the value
              System.out.println(plist.getString(keys.next()));
          }
  
      }
  </code></pre>
  
  <p>The file f is the <code>.plist</code> file.
  Now  the file is structured as:</p>
  
  <pre><code>&lt;key&gt;dictionary&lt;/key&gt;
           &lt;array&gt;
           &lt;dict&gt;
               &lt;key&gt;key1&lt;/key&gt;
               &lt;string&gt;value1&lt;/string&gt;
               &lt;key&gt;key2&lt;/key&gt;
               &lt;string&gt;value2&lt;/string&gt;
               &lt;key&gt;key3&lt;/key&gt;
               &lt;string&gt;value3&lt;/string&gt;
           &lt;/dict&gt;
          &lt;/array&gt;
  </code></pre>
  
  <p>And when I'm trying to get the content of the key "dictionnary" the result is <strong>null</strong>. When the <code>&lt;array&gt;</code> is deleted it works fine. 
  This is part of a testfile I wrote and I could simply remove the <code>&lt;array&gt;</code> but the file I'm intended to parse this part can't be removed. 
  What does I have to do to get into the <code>array</code>?</p>