So, I turned instead to the iCalendar formatted feed, which is usually used for subscribing to a public calendar. This contained all the information I needed, although not in a format I was used to dealing with. I could, of course, have decided to change the code to process the iCalendar feed directly. However, an approach based on the XML of the RSS feed seemed to be much simpler, and fitted with the way the rest of the site was put together. Technical note and disclaimer: The website was running on a Windows Server box, so the following is written as a JScript-based scheduled script.
In the meantime, I hope this is helpful to others. Before running the regular expressions I modified the file containing the iCalendar data so that each field was on a single line:. Then I loaded this file into a test variable called fsotext and ran the following regular expressions on it:.
The final step, before converting the XML into a snippet of HTML, was to handle events spanning one or more days, and remove any events that had already happened:. Then it was just a case of deciding how to display the information and creating an XSL stylesheet to do the job. Tags: calendar , convert , events , feed , google , icalendar , jscript , rss , xml. This entry was posted on 30 November at pm and is filed under clients , codes , development.
This may be a good pointer for further searches for certain file conversions and help you find the converter you are looking for if our search result is insufficient for you. However, it is far from perfect and may sometimes show results which are not really usable because of the nature of the software handles the files.
So a conversion that appears as possible, just because of matched actions, may in fact not be possible. Additional links : Open ics file , Open xml file. Files with ics extension are calendar data in exchange format which is widely accepted in many personal information managers and e-mail clients such as Microsoft Outlook, or Apple iCal.
It is an universal format for transporting calendar data and events from one program to another. An xml file extension is commonly used for files written in Extensible Markup Language.
An xml file is used in various areas of computer industry and many program languages are just derivatives of XML. Add a comment. Active Oldest Votes. Improve this answer. Nic Gibson Nic Gibson 6, 2 2 gold badges 27 27 silver badges 38 38 bronze badges. Thanks for the response, it seems I'm stuck with just the normal iCal implementation I'm afraid. I did a little more digging and found this example designadmin. If I have a little time, I'll take a look at that, looks interesting — Nic Gibson.
Graham - that looks like a good place to start. When you execute the stylesheet, pass in the string value for the iCal in the ical-data-raw parameter. The templates work on the ical-data-raw parameter and don't do anything with the source XML doc. Mads - Thanks for the explanation that makes sense now that I've had more time to look through it. You will need to use something else to generate the XML doc that puts wrapping elements around the iCal text e. Show 1 more comment.
Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.
0コメント