• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
reading NSDate from old-style plist?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

reading NSDate from old-style plist?


  • Subject: reading NSDate from old-style plist?
  • From: Barry Wark <email@hidden>
  • Date: Thu, 1 Sep 2005 13:23:52 -0700

I'm trying to use NSString's  propertyList: method to parse the plist
returned by the xgrid command line util[1]. xgrid results are printed
to stdout as old-style plists. Unfortunately, the old-style parse
appears to choke on dates:
{
jobAttributes = {
        activeCPUPower = 0;
        applicationIdentifier = PyXG;
        dateNow = 2005-09-01 13:15:25 -0700;
        dateStarted = 2005-09-01 12:53:29 -0700;
        dateStopped = 2005-09-01 12:53:31 -0700;
        dateSubmitted = 2005-09-01 12:53:27 -0700;
        jobStatus = Finished;
        percentDone = 100;
        taskCount = 1;
        undoneTaskCount = 0;
    };
}


plutil (and propertyList:) gives the error

XML parser error:
        Unexpected character { at line 1
Old-style plist parser error:
        Missing ';' on line 5

>From the docs, it looks like old-style plists can't contain dates.

Does anyone know of a workaround to this or am I stuck?

Thanks,
Barry

[1] As you can see from the plist below, I'm using PyXG in a python
script. Without the full NSRunLoop machinery, I'm not able to use the
XgridFoundation framework and so am stuck parsing the output of the
xgrid util.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: [ANN] Next CocoaHeads: Sep 8. New Chapter in Portland, OR (Sep 13)
  • Next by Date: How do you have a core data based app handle non core data based docs?
  • Previous by thread: [ANN] Next CocoaHeads: Sep 8. New Chapter in Portland, OR (Sep 13)
  • Next by thread: How do you have a core data based app handle non core data based docs?
  • Index(es):
    • Date
    • Thread