xsdata.formats.dataclass.parsers.utils module

class xsdata.formats.dataclass.parsers.utils.ParserUtils[source]

Bases: object

classmethod parse_value(types, value, default=None, ns_map=None, tokens=False)[source]

Convert xml string values to s python primitive type.

Return type

Any

classmethod bind_element_children(params, meta, position, objects)[source]

Return a dictionary of qualified object names and their values for the given queue item.

classmethod fetch_any_children(position, objects)[source]
Return type

List[object]

classmethod bind_element_param(params, var, value)[source]
classmethod bind_element_wildcard_param(params, var, qname, value)[source]
classmethod bind_element_wild_text(params, meta, element)[source]
classmethod element_text_and_tail(element)[source]
Return type

Tuple

classmethod parse_any_element(element, qname=True)[source]
Return type

AnyElement

classmethod parse_any_attributes(element)[source]
classmethod bind_element_text(params, metadata, element)[source]
classmethod bind_element_attrs(params, metadata, element)[source]

Parse the given element’s attributes and any text content and return a dictionary of field names and values based on the given class metadata.

classmethod find_eligible_wildcard(meta, qname, params)[source]
Return type

Optional[XmlVar]