def xobject_none(etree): namespace, name = get_namespace_and_name(etree.tag) elem = element_none() object.__setattr__(elem, '_namespace_', namespace) object.__setattr__(elem, '_name_', name) elem._etree_ = etree elem._value_manipulator_ = ValueManipulator(etree) return elem
def xobject_datetime(etree): namespace, name = get_namespace_and_name(etree.tag) dt = dateutil_parse(etree.text) elem = element_datetime(dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, dt.microsecond, dt.tzinfo) elem._etree_ = etree object.__setattr__(elem, '_namespace_', namespace) object.__setattr__(elem, '_name_', name) elem._value_manipulator_ = ValueManipulator(etree) return elem
def xobject_list(parent_etree, name): namespace, tag_name = get_namespace_and_name(parent_etree.tag) elem = element_list() object.__setattr__(elem, '_parent_etree_', parent_etree) object.__setattr__(elem, '_namespace_', namespace) object.__setattr__(elem, '_name_', name) if not hasattr(elem, '_conversions_'): object.__setattr__(elem, '_conversions_', conversion_chart) if not hasattr(elem, '_text_value_conversions_'): object.__setattr__(elem, '_text_value_conversions_', text_value_conversions) return elem