code: def as_value(ele):
          
          dtype = ele.Datatype
          #print '%s = %s' % (ele.Name, dtype)
          if dtype in (1, 2, 3, 4, 5, 6, 7, 9, 12):
              # BOOL, CHAR, BYTE, INT32, INT64, FLOAT32, FLOAT64, BYTEARRAY, DECIMAL)
              return ele.Value
          elif dtype == 8:  # String
              val = ele.Value
              if val:
                  # us centric :)
                  val = val.encode('ascii', 'replace')
              return str(val)
          elif dtype == 10:  # Date
              v = ele.Value
              return datetime(year=v.year, month=v.month, day=v.day).date() if v else np.nan
          elif dtype == 11:  # Time
              v = ele.Value
              return datetime(hour=v.hour, minute=v.minute, second=v.second).time() if v else np.nan
          elif dtype == 13:  # Datetime
              v = ele.Value
              return datetime(year=v.year, month=v.month, day=v.day, hour=v.hour, minute=v.minute, second=v.second)
          elif dtype == 14:  # Enumeration
              raise NotImplementedError('ENUMERATION data type needs implemented')
          elif dtype == 16:  # Choice
              raise NotImplementedError('CHOICE data type needs implemented')
          elif dtype == 15:  # SEQUENCE
              return XmlHelper.get_sequence_value(ele)
          else:
              raise NotImplementedError('Unexpected data type %s. Check documentation' % dtype)
docs: convert the specified element as a python value