public class HCalendarParser extends Object implements CalendarParser
CalendarParserthat parses XHTML documents that include calendar data marked up with the hCalendar microformat.
The parser treats the entire document as a single "vcalendar" context, ignoring any
and adding all components in the document to a single generated calendar.
Since hCalendar does not include product information, the
PRODID property is omitted from the generated
calendar. The hCalendar profile is supposed to define the iCalendar version that it represents, but it does not, so
version 2.0 is assumed.
This parser recognizes only "vevent" components.
This parser recognizes the following properties:
hCalendar allows for some properties to be represented by nested microformat records, including hCard, adr and geo. This parser does not recognize these records. It simply accumulates the text content of any child elements of the property element and uses the resulting string as the property value.
hCalendar date-time values are formatted according to RFC 3339. There is no representation in this specification for time zone ids. All date-times are specified either in UTC or with an offset that can be used to convert the local time into UTC. Neither does hCal provide a reprsentation for floating date-times. Therefore, all date-time values produced by this parser are in UTC.
Some examples in the wild provide date and date-time values in iCalendar format rather than RFC 3339 format. Although not technically legal according to spec, these values are accepted. In this case, floating date-times are produced by the parser.
hCalendar does not define attributes, nested elements or other information elements representing parameter data. Therefore, this parser does not set any property parameters except as implied by property value data (e.g. VALUE=DATE-TIME or VALUE=DATE for date-time properties).
|Modifier and Type||Method||Description|
Parse the iCalendar data from the specified input stream.
Parse the iCalendar data from the specified reader.
public void parse(InputStream in, ContentHandler handler) throws IOException, ParserException
in- an input stream from which to read iCalendar data
handler- the content handler to notify during parsing
IOException- thrown when unable to read from the specified stream
ParserException- thrown if an error occurs during parsing
public void parse(Reader in, ContentHandler handler) throws IOException, ParserException