dcc_quantities.serializers.dcc_element_key ¶
Serialization of DCC elements that can be extracted from the XML file.
DccElementKey ¶
Enumeration where all elements have the corresponding DCC-XML key as value.
Each element value corresponds to a key 'dcc:{element_name}', which is a standardized DCC key for an XML file.
All members of the DccElementKey instances are strings and allow any
string method.
| Attributes: |
|
|---|
Notes
The string 'dcc:{element_name}' can also be used instead of calling directly a member of this class. For example
DccElementKey.CONTENT is equivalent to parsing the string 'dcc:content'.
Examples:
>>> content_key = DccElementKey.CONTENT
>>> repr(content_key)
"<DccElementKey.CONTENT: 'dcc:content'>"
>>> print(content_key)
dcc:content
>>> table_key = DccElementKey.TABLE
>>> repr(table_key)
"<DccElementKey.LIST: 'dcc:list'>"
>>> print(table_key)
dcc:list
>>> table_key == "dcc:list"
True