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, text=False, element=False, elements=False, wildcard=False, attribute=False, attributes=False, types=<factory>, choices=<factory>, namespaces=<factory>, xml_type=None)[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 withDerivedElementany_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 elementstext (
bool) – Field is derived from xs:simpleTypeelement (
bool) – Field is derived from xs:elementelements (
bool) – Field is derived from xs:choicewildcard (
bool) – Field is derived from xs:anyTypeattribute (
bool) – Field is derived from xs:attributeattributes (
bool) – Field is derived from xs:attributesxml_type (
Optional[InitVar]) –
-
matches(qname)[source]¶ Match the field qualified local name to the given qname.
Return True automatically if the local name is a wildcard.
-
find_value_choice(value)[source]¶ Match and return a choice field that matches the given value type.