web/ldt/ldt_utils/utils.py
changeset 137 d363fa6232b2
parent 116 811b34fd1bc0
equal deleted inserted replaced
136:b1d77caeec41 137:d363fa6232b2
    14     '0':False,
    14     '0':False,
    15     '1':True,
    15     '1':True,
    16     't': True,
    16     't': True,
    17     'f':False
    17     'f':False
    18 }
    18 }
       
    19 
       
    20 def reduce_text_node(element_node, xpath_str):
       
    21     return reduce(lambda t, s: t+s, element_node.xpath(xpath_str, smart_strings=False), "")
    19 
    22 
    20 def boolean_convert(bool):
    23 def boolean_convert(bool):
    21     if bool is None:
    24     if bool is None:
    22         return False
    25         return False
    23     if bool is True or bool is False:
    26     if bool is True or bool is False: