读取/解析iCalendar文件(.ics) [英] Reading/Parsing an iCalendar File (.ics)

查看:788
本文介绍了读取/解析iCalendar文件(.ics)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我正在寻找一些从wesbite加载iCalendar文件的C#代码,循环遍历.ics文件并从文件中的每个事件中提取事件详细信息。我不想使用aspose.icalendar或另一个流行的软件包。


我的最终目标是获取iCal数据并导入SQL Server数据库。我可以处理导入到数据库,但是我在从外部网站读取iCalendar文件时遇到问题。


我以前能够加载rss文件并拉这些文件中的数据进入数据库。我不知道如何加载结构化的文件会有所不同。


我的理由是什么?


谢谢。

Hello,
I''m looking for some C# code that loads a iCalendar file from a wesbite, loops through the .ics file and extracts the event details from each event in the file. I don''t want to use aspose.icalendar or another one of the popular packages.

My ultimate goal is take the iCal data and import into a SQL Server database. I can handle the import to the database but I''m having trouble reading the iCalendar files from external website.

I''ve been able to load rss files in the past and pull the data within those files into a database. I don''t see how loading a structured ical file would be that different.

Is my reasoning off?

Thanks.

推荐答案

我想如果您可以关注 RFC ,则不应解析.ics文件是个问题。这样做似乎是合理的。

我肯定谷歌可能会这样做,也许他们会就此事发布一些API?


你的意思是什么?从网站上读取文件?

您希望您的应用程序转到某个http://地址并获取要解析的文件吗?
I suppose if you can follow the RFC for it, parsing an .ics file should not be a problem. It seems reasonable to do.
I''m sure google probably does it, maybe they release some API on the matter?

What do you mean by reading the file from a website?
Like you want your application to go to some http:// address and get a file to parse?



我想你是否可以按照 RFC 为此,解析.ics文件应该不是问题。这样做似乎是合理的。

我肯定谷歌可能会这样做,也许他们会就此事发布一些API?


你的意思是什么?从网站上读取文件?

就像您希望您的应用程序转到某个http://地址并获取要解析的文件一样?
I suppose if you can follow the RFC for it, parsing an .ics file should not be a problem. It seems reasonable to do.
I''m sure google probably does it, maybe they release some API on the matter?

What do you mean by reading the file from a website?
Like you want your application to go to some http:// address and get a file to parse?



基本上是的。我想从网站加载外部icalendar文件,然后获取icalendar文件中的数据并将其导入SQL Server数据库。


我在尝试解析ical文件时遇到问题。

Basically yes. I want to load an external icalendar file from a website and then take the data in the icalendar file and import it into a SQL server database.

I''m having issues trying to parse the ical file.


您可以在服务器端代码上使用HttpWebRequest来尝试抓取来自互联网地址的iCal文件。

http:// en .wikipedia.org / wiki / ICalendar


看起来很像它只是名称:价值对?
Well you can use HttpWebRequest on the serverside code to try and grab the iCal file from the internet address.

http://en.wikipedia.org/wiki/ICalendar

Looks pretty much like it is just name : value pairs?


这篇关于读取/解析iCalendar文件(.ics)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆