code: def getdata(self, tree, location, force_string=False):
          
          found = tree.xpath('%s/text()' % location)
          if not found:
              return None
          else:
              data = found[0]
          if force_string:
              return data
          if data == 'True':
              return True
          elif data == 'False':
              return False
          else:
              try:
                  return int(data)
              except ValueError:
                  try:
                      return float(data)
                  except ValueError:
                      # It's a string
                      return data
docs: Gets XML data from a specific element and handles types.