code: def parse_trips(self, xml, requested_time):
          
          obj = xmltodict.parse(xml)
          trips = []
  
          if 'error' in obj:
              print('Error in trips: ' + obj['error']['message'])
              return None
  
          try:
              for trip in obj['ReisMogelijkheden']['ReisMogelijkheid']:
                  newtrip = Trip(trip, requested_time)
                  trips.append(newtrip)
          except TypeError:
              # If no options are found, obj['ReisMogelijkheden'] is None
              return None
  
          return trips
docs: Parse the NS API xml result into Trip objects