icalendar.parser.xcal.parameters module#
- class icalendar.parser.xcal.parameters.XCalParameterParser(element, types_factory=None)[source]#
Bases:
XCalParserA parser for one parameter.
- class icalendar.parser.xcal.parameters.XCalParametersParser(element, types_factory=None)[source]#
Bases:
XCalParserA parser for <parameters>.
- Parameters:
element (
Element|ElementAdapter) – The xCal element to parse.types_factory (
TypesFactory|None) – The types factory to use. IfNoneis passed, the default TypesFactory is used.
Example
The parameter
elementcan be aparameterstag as shown below:<parameters> <tzid> <text>US/Eastern</text> </tzid> </parameters>
- parse_parameter()[source]#
Parse the next parameter that has not been parsed, yet.
This function only parses one parameter inside the parser's
elementparameter and adds it to the collected parameters. Each call parses a single parameter.- Raises:
XCalParsingError – If the provided xCal is invalid.
InvalidParserState – If all parameters have been parsed.
- Return type:
Example
The example below shows a
parameterstag with atzidparameter. This function would only parse thetzidparameter.<parameters> <tzid> <text>US/Eastern</text> </tzid> </parameters>
- parse_parameters()[source]#
Parse all parameters until finished.
Parameters are parsed once and are the same for all property values inside a property tag. This method parses the whole
parameterstag collects them and returns them as aParametersobject.- Return type:
- Returns:
The parsed parameters.
- Raises:
XCalParsingError – If the provided xCal is invalid.