XmlVar¶
- class xsdata.formats.dataclass.models.elements.XmlVar(index, name, qname, types, init, mixed, tokens, format, derived, any_type, nillable, sequential, list_element, default, xml_type, namespaces, elements, wildcards, **kwargs)[source]¶
Class field binding metadata.
- Parameters
index (
int
) – Field orderingname (
str
) – Field nameqname (
str
) – Qualified nametypes (
Sequence
[Type
]) – List of all the supported data typesinit (
bool
) – Include field in the constructormixed (
bool
) – Field supports mixed content type valuestokens (
bool
) – Field is derived from xs:listderived (
bool
) – Wrap parsed values with a generic typeany_type (
bool
) – Field supports dynamic value typesnillable (
bool
) – Field supports nillable contentsequential (
bool
) – Render values in sequential modelist_element (
bool
) – Field is a list of elementsdefault (
Any
) – Field default value or factoryxml_Type – Field xml type
namespaces (
Sequence
[str
]) – List of the supported namespaceselements (
Mapping
[str
,XmlVar
]) – Mapping of qname-repeatable elementsxml_type (
str
) –kwargs (
Any
) –
- find_value_choice(value)[source]¶
Match and return a choice field that matches the given value type.
- find_type_choice(value, tp, tokens, check_subclass)[source]¶
Match and return a choice field that matches the given type.