Deserialised¤
Deserialised
dataclass
¤
Represents the opposite of the serialised element in an equipment register.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
Any
|
The value of the deserialised object. |
required |
comment
|
str
|
A comment to associate with the (de)serialised object. |
''
|
comment
class-attribute
instance-attribute
¤
comment: str = ''
A comment associated with the (de)serialised object.
from_xml
classmethod
¤
from_xml(element: Element[str]) -> Deserialised
Convert a serialised XML element into a Deserialised instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
element
|
Element[str]
|
A serialised XML element from an equipment register. |
required |
Returns:
Type | Description |
---|---|
Deserialised
|
The Deserialised instance. |
to_xml ¤
Convert the Deserialised class into a serialised XML element.
Returns:
Type | Description |
---|---|
Element[str]
|
The serialised XML element. |