• 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
RE: iCal calendar parser
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: iCal calendar parser


  • Subject: RE: iCal calendar parser
  • From: "Josh Ferguson" <email@hidden>
  • Date: Mon, 10 Feb 2003 11:49:52 -0600
  • Priority: normal
  • Thread-topic: iCal calendar parser

Ian,

First of all, property lists are a (very small) subset of XML, and the Property List editor was only designed to open those files; not to be an XML Parser. To answer your question, they are not XML files (but not just because the Property List editor cannot open them). You can tell this pretty quickly by opening it in a generic text editor (which you've obviously already done) and noting the absence of any <> tags. It looks like it's organized in a proprietary key-value scheme (why it's not in XML, I don't know), but you should be able to look for certain keys (as you've specified below, the BEGIN:VEVENT and END:VEVENT) and extract the data you need. I'd recommend looking for the "BEGIN:" and "END:" statements and reading the data based on what follows (as opposed to just looking for "BEGIN:EVENT"). This allows for more flexible parsing if you need it in the future.

Anyways, that's just my 2 cents =). Hope that helps.

Josh

-----Original Message-----
From: Ian G. Gillespie [mailto:email@hidden]
Sent: Monday, February 10, 2003 10:03 AM
To: Aidas Dailide
Cc: Cocoa Development List
Subject: Re: iCal calendar parser


Hi Aidas,

Thanks for your encouragement. I tried opening an iCal file (.ics)
with Property List Editor and nothing happened. Does this mean that it
is not in XML format? If this is the case, then probably the best
thing to do is get the string from an .ics file and search through it
looking for words like: BEGIN:VEVENT and then extract the time and such.

~Ian

On Monday, February 10, 2003, at 03:49 AM, Aidas Dailide wrote:

>
> Hi,
>
> Actually this should be very easy with Cocoa. I guess iCal format is
> xml-based,so it will bi very easy to parse it. There are functions like
> NSArray initWithConentsOfFile:(file name) that helps you do that.
> After you
> do this, you can simply call functions like
> objectForKey:CalendarName(this
> depends on iCal file format,wich you must explore).
>
> Hope this will help, if you need additional info, please don't
> hestatite
> and contact me.
>
> Aidas
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: iCal calendar parser
      • From: David Remahl <email@hidden>
    • Re: iCal calendar parser
      • From: Mark Minnigerode <email@hidden>
  • Prev by Date: "BAD_ACCESS" error when showing window [newbie to cocoa]
  • Next by Date: Re: iCal calendar parser
  • Previous by thread: Re: iCal calendar parser
  • Next by thread: Re: iCal calendar parser
  • Index(es):
    • Date
    • Thread