ajax plist & pull info

ajax plist & pull info

Hi,

I'm trying to read a .plist file on the server and pull specific info.  Have gotten it this far, but not sure where it's wrong.  Nothing is being output to console.

  1. $(document).ready(function() {
  2.   $.ajax({
  3.     url: "http://www.server/pathto/my.plist",
  4.     cache: false
  5.   })
  6.     .done(function(data) {
  7.       $(this).find("date").each(function() {
  8.         var item = $(this).text();
  9.         //var bkset = ?
  10.         //var bkset_time = ?
  11.         console.log("item: " + item);
  12.       });
  13.   });
  14. });

I want it to look at a typical plist like this.

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3. <plist version="1.0">
  4. <array>
  5.   <dict>
  6.     <key>backupset</key>
  7.     <string>MySetName</string>
  8.      ...
  9.      <key>lastBackup</key>
  10.     <date>2014-04-15T15:39:21Z</date>
  11.    </dict>
  12.   ... more dictionaries containing other backupsets
  13. </array>

There may be multiple backupsets, and I want to pull the name of the backupset & the date from minhourdate for each backup set.

Thanks,  Bill