mixins
xsdata.formats.dataclass.serializers.tree.mixins
TreeSerializer dataclass
Bases: EventGenerator
Source code in xsdata/formats/dataclass/serializers/tree/mixins.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | |
render(obj) abstractmethod
Serialize the input model instance to element tree.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
obj | T | The input model instance to serialize | required |
Returns:
| Type | Description |
|---|---|
Any | The generated element tree instance. |
Source code in xsdata/formats/dataclass/serializers/tree/mixins.py
21 22 23 24 25 26 27 28 29 30 | |
build(obj, builder)
Feed the builder with events from input model instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
obj | T | The input model instance to serialize | required |
builder | TreeBuilder | The tree builder instance | required |
Source code in xsdata/formats/dataclass/serializers/tree/mixins.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | |