public void startElement(String uri, String localName, String qName, Attributes attributes)
      throws SAXException {

    if (qName.equalsIgnoreCase("situation")) {
      sit = new MobisTrafficSituation();
      records = new ArrayList<>();
      sit.setProviderId(attributes.getValue("id"));
      sit.setProvider("TRAFIKVERKET_DATEX");
      sit.setVersion(Integer.parseInt(attributes.getValue("version")));
      sit.setPublicationTime(publTime);
      sit.setCountry("Sweden");
    }

    if (qName.equalsIgnoreCase("situationrecord")) {
      sitRec = new MobisTrafficSituationRecord();
      sitRec.setProviderId(attributes.getValue("id"));
      sitRec.setProvider("TRAFIKVERKET_DATEX");
      sitRec.setSituationRecordVersion(Integer.parseInt(attributes.getValue("version")));
      sitRec.setSituationRecordType(attributes.getValue("xsi:type"));
    }

    if (qName.equalsIgnoreCase("situationversiontime")) {
      isVersionTime = true;
    }

    if (qName.equalsIgnoreCase("publicationtime")) {
      isPublicationTime = true;
    }

    if (qName.equalsIgnoreCase("situationrecordversiontime")) {
      isRecordVersionTime = true;
    }

    if (qName.equalsIgnoreCase("severity")) {
      isSeverity = true;
    }

    if (qName.equalsIgnoreCase("overallseverity")) {
      isOverallSeverity = true;
    }

    if (qName.equalsIgnoreCase("overallstarttime")) {
      isStartTime = true;
    }

    if (qName.equalsIgnoreCase("overallendtime")) {
      isEndTime = true;
    }

    if (qName.equalsIgnoreCase("generalpubliccomment")) {
      isComment = true;
    }

    if (qName.equalsIgnoreCase("value") && isComment) {
      isCommentValue = true;
    }

    if (qName.equalsIgnoreCase("commenttype")) {
      isCommentType = true;
    }

    if (qName.equalsIgnoreCase("locationForDisplay")) {
      isLocationForDisplay = true;
    }

    if (qName.equalsIgnoreCase("latitude") && isLocationForDisplay) {
      isLat = true;
    }

    if (qName.equalsIgnoreCase("longitude") && isLocationForDisplay) {
      isLng = true;
    }

    if (qName.equalsIgnoreCase("roadnumber")) {
      isRoadNumber = true;
    }

    if (qName.equalsIgnoreCase("carriageway")) {
      isCarriageway = true;
    }

    if (qName.equalsIgnoreCase("lengthAffected")) {
      isLengthAffected = true;
    }

    if (qName.equalsIgnoreCase("speedManagementType")
        || qName.equalsIgnoreCase("roadMaintenanceType")
        || qName.equalsIgnoreCase("roadOrCarriagewayOrLaneManagementType")) {
      isText = true;
    }

    if (qName.equalsIgnoreCase("temporarySpeedLimit")) {
      isSpeedLimit = true;
    }
  }