Parsing VCalendar



我有一个VCalendar通过url检索:

PRODID: test_online
VERSION: 1.0
METHOD:PUBLISH
BEGIN:VEVENT
SUMMARY: It's a test
DESCRIPTION: Test an vcalendar parser
LOCATION:
DTSTART: 11/6/2011 3:00:00 PM
DTEND: 11/10/2011 11:59:00 PM
CATEGORIES: Other tests
END:VEVENT
END:VCALENDAR

除了分割字符串之外,是否存在其他方法来解析这样的vcalendar ?我已经尝试使用Ical4j,但我总是得到以下错误:

The exception contained within MappableContainerException could not be mapped to a    response, re-throwing to the HTTP container
我的代码是:
StringReader s = new StringReader(vcal);
CalendarBuilder builder = new CalendarBuilder();
Calendar c = builder.build(s);
System.out.println(c.toString());

有人能帮我一下吗?

遗憾的是,iCal4j只支持iCalendar(即版本:2.0),不支持vCalendar。

例如,上面示例中的日期不符合iCalendar标准,因此它无法解析

android VCal类会有帮助吗?

有一个字符串解析器。

https://android.googlesource.com/platform/packages/providers/CalendarProvider/+/donut-release2/src/com/android/providers/calendar/VCal.java

相关内容

  • 没有找到相关文章

最新更新