xspf_lib.Extension

class xspf_lib.Extension(application: str, extra_attrib: ~typing.Dict[str, str] = <factory>, content: ~typing.List[~xml.etree.ElementTree.Element] = <factory>)

Class for XML extensions of XSPF playlists and tracks.

Extension must have attribute application URI which point to extension standard. Extension can have an elements of type xml.etree.ElementTree.Element. Additional xml attributes are welcome.

Parameters:
  • application – URI of specification of extension.

  • extra_attrib (dict[str, str]) – List additional xml attributes for xml extension.

  • content (list[xml.etree.ElementTree.Element]) – Elements of content.

__init__(application: str, extra_attrib: ~typing.Dict[str, str] = <factory>, content: ~typing.List[~xml.etree.ElementTree.Element] = <factory>) None

Methods

__init__(application[, extra_attrib, content])

parse_from_xml_element(element)

xml.etree.ElementTree.Element to Extension conversion.

to_xml_element()

Extension to xml.etree.ElementTree.Element conversion.

Attributes

application

URI of specification of extension.

extra_attrib

List additional xml attributes for xml extension.

content

Elements of content.