xspf_lib.Attribution

class xspf_lib.Attribution(location: Optional[str] = None, identifier: Optional[str] = None)

Object representation of attribution element.

Can contain location attribute or identifier attribute or both.

It’s obvious to add something to location to create location attribution. Or, you can add only identifier to create identifier attribute. You also can add both attribution and location field to create 2 attribution elements. Not putting both attributes is little odd.

__init__(location: Optional[str] = None, identifier: Optional[str] = None) None

Methods

__init__([location, identifier])

parse_from_xml_element(element)

Parse xml.etree.ElementTree.Element to data model

to_xml_element()

Convert data model to xml.etree.ElementTree.Element

xml_elements()

Create generator of xml representation.

Attributes

identifier

location