XmlVar¶
- class xsdata.formats.dataclass.models.elements.XmlVar(name, qname, init=True, mixed=False, tokens=False, format=None, derived=False, any_type=False, nillable=False, dataclass=False, sequential=False, list_element=False, default=None, is_text=False, is_element=False, is_elements=False, is_wildcard=False, is_attribute=False, is_attributes=False, index=<factory>, types=<factory>, namespaces=<factory>, elements=<factory>, wildcards=<factory>)[source]¶
Dataclass field binding metadata.
- Parameters
name (
str
) – Field nameqname (
str
) – Qualified nameinit (
bool
) – Include field in the constructormixed (
bool
) – Field supports mixed content type valuestokens (
bool
) – Field is derived from xs:listderived (
bool
) – Wrap parsed values withDerivedElement
any_type (
bool
) – Field supports dynamic value typesnillable (
bool
) – Field supports nillable contentdataclass (
bool
) – Field value is bound to a dataclasssequential (
bool
) – Render values in sequential modelist_element (
bool
) – Field is a list of elementsis_text (
bool
) – Field is derived from xs:simpleTypeis_element (
bool
) – Field is derived from xs:elementis_elements (
bool
) – Field is derived from xs:choiceis_wildcard (
bool
) – Field is derived from xs:anyTypeis_attribute (
bool
) – Field is derived from xs:attributeis_attributes (
bool
) – Field is derived from xs:attributesindex (
int
) – Field orderingtypes (
Tuple
[Type
, …]) – List of all the supported data typesnamespaces (
Tuple
[str
, …]) – List of the supported namespaceselements (
Dict
[str
,XmlVar
]) – Mapping of qname-repeatable elements
- Variables
namespace_matches – Matching cache for the repeatable wildcards
- property clazz: Optional[Type]¶
Return the first type if field is bound to a dataclass.
- find_value_choice(value)[source]¶
Match and return a choice field that matches the given value type.