def __init__(self, app=None, validator=None, wrapped=True, xml_declaration=True, cleanup_namespaces=True): XmlDocument.__init__(self, app, validator, xml_declaration, cleanup_namespaces) self.__wrapped = wrapped
def __init__(self, app=None, validator=None, wrapped=True, xml_declaration=True, cleanup_namespaces=True): XmlDocument.__init__(self, app, validator, xml_declaration, cleanup_namespaces) self.__wrapped = wrapped # SOAP requires DateTime strings to be in iso format. This function # bypasses datetime formatting via DateTime(format="...") string. self.serialization_handlers[DateTime] = _datetime_to_parent_element self.deserialization_handlers[DateTime] = _datetime_from_element
def __init__(self, app=None, validator=None, xml_declaration=True, cleanup_namespaces=True, encoding='UTF-8', pretty_print=False): XmlDocument.__init__(self, app, validator, xml_declaration, cleanup_namespaces, encoding, pretty_print) # SOAP requires DateTime strings to be in iso format. The following # lines make sure custom datetime formatting via DateTime(format="...") # string is bypassed. self._to_string_handlers[Time] = lambda cls, value: value.isoformat() self._to_string_handlers[DateTime] = lambda cls, value: value.isoformat() self._from_string_handlers[Date] = date_from_string_iso self._from_string_handlers[DateTime] = datetime_from_string_iso
def __init__(self, app=None, validator=None, xml_declaration=True, cleanup_namespaces=True, encoding='UTF-8', pretty_print=False): XmlDocument.__init__(self, app, validator, xml_declaration, cleanup_namespaces, encoding, pretty_print) # SOAP requires DateTime strings to be in iso format. The following # lines make sure custom datetime formatting via DateTime(format="...") # string is bypassed. self._to_string_handlers[Time] = lambda cls, value: value.isoformat() self._to_string_handlers[ DateTime] = lambda cls, value: value.isoformat() self._from_string_handlers[Date] = date_from_string_iso self._from_string_handlers[DateTime] = datetime_from_string_iso