add_nillable_text_overrides
xsdata.codegen.handlers.add_nillable_text_overrides
AddNillableTextOverrides
Bases: RelativeHandlerInterface
Override inherited text attrs for nillable classes.
A nillable element accepts nil content, even if its base type requires a text value. The parser binds the nil text as None, so the class needs its own nillable copy of the text attr.
Source code in xsdata/codegen/handlers/add_nillable_text_overrides.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
process(target)
Process entrypoint for classes.
Skip classes that are not nillable or have their own text attr, the attr types processor cascades the flag to them.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target | Class | The target class instance | required |
Source code in xsdata/codegen/handlers/add_nillable_text_overrides.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |