title: Can I convert an iOS Info.plist into a ruby Hash?
body: <p>I need to exclude specific keys found in an Info.plist for my app if they are found in another Hash. Currently I can access individual keys in Info.plist like this</p>
  
  <pre><code>setting4Str = `/usr/libexec/PlistBuddy -c \"print :MySettingsDict:setting4" {settings_file}`
  </code></pre>
  
  <p>and I can get the "setting 4 text" string set at this key in the plist dictionary...</p>
  
  <p>However, I want to be able to iterate over all keys of this MysettingsDict. Does anyone have a method to convert an iOS XML plist to a ruby Dictionary?</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
  &lt;plist version="1.0"&gt;
  &lt;dict&gt;
      &lt;key&gt;CFBundleDisplayName&lt;/key&gt;
      &lt;string&gt;My App&lt;/string&gt;
      &lt;key&gt;CFBundleExecutable&lt;/key&gt;
      &lt;string&gt;${EXECUTABLE_NAME}&lt;/string&gt;
      &lt;key&gt;CFBundleIdentifier&lt;/key&gt;
      &lt;string&gt;com.company.appname&lt;/string&gt;
      &lt;key&gt;CFBundleInfoDictionaryVersion&lt;/key&gt;
      &lt;string&gt;6.0&lt;/string&gt;
      &lt;key&gt;CFBundleLocalizations&lt;/key&gt;
      &lt;array&gt;
          &lt;string&gt;en&lt;/string&gt;
          &lt;string&gt;de&lt;/string&gt;
          &lt;string&gt;it&lt;/string&gt;
          &lt;string&gt;fr&lt;/string&gt;
          &lt;string&gt;ru&lt;/string&gt;
          &lt;string&gt;es&lt;/string&gt;
      &lt;/array&gt;
      &lt;key&gt;CFBundleName&lt;/key&gt;
      &lt;string&gt;${PRODUCT_NAME}&lt;/string&gt;
      &lt;key&gt;CFBundlePackageType&lt;/key&gt;
      &lt;string&gt;APPL&lt;/string&gt;
      &lt;key&gt;CFBundleShortVersionString&lt;/key&gt;
      &lt;string&gt;1.3.2&lt;/string&gt;
      &lt;key&gt;CFBundleSignature&lt;/key&gt;
      &lt;string&gt;????&lt;/string&gt;
      &lt;key&gt;CFBundleURLTypes&lt;/key&gt;
      &lt;array&gt;
          &lt;dict&gt;
              &lt;key&gt;CFBundleURLName&lt;/key&gt;
              &lt;string&gt;com.company.mySchemeName&lt;/string&gt;
              &lt;key&gt;CFBundleURLSchemes&lt;/key&gt;
              &lt;array&gt;
                  &lt;string&gt;mySchemeName&lt;/string&gt;
              &lt;/array&gt;
          &lt;/dict&gt;
      &lt;/array&gt;
      &lt;key&gt;CFBundleVersion&lt;/key&gt;
      &lt;string&gt;1.3.15.04170&lt;/string&gt;
      &lt;key&gt;Internal version&lt;/key&gt;
      &lt;string&gt;1.3.15.04170&lt;/string&gt;
      &lt;key&gt;LSRequiresIPhoneOS&lt;/key&gt;
      &lt;true/&gt;
      &lt;key&gt;MysettingsDict&lt;/key&gt;
      &lt;dict&gt;
          &lt;key&gt;setting1&lt;/key&gt;
          &lt;false/&gt;
          &lt;key&gt;setting2&lt;/key&gt;
          &lt;false/&gt;
          &lt;key&gt;setting3&lt;/key&gt;
          &lt;false/&gt;
          &lt;key&gt;setting4&lt;/key&gt;
          &lt;string&gt;setting 4 text&lt;/string&gt;
          &lt;key&gt;setting5&lt;/key&gt;
          &lt;string&gt;setting 5 text&lt;/string&gt;
          &lt;key&gt;setting6&lt;/key&gt;
          &lt;false/&gt;
          &lt;key&gt;setting7&lt;/key&gt;
          ...
  </code></pre>