code: @Override
    public void startElement(String namespaceURI, String lName,
        String qName, Attributes attrs) throws SAXException {
      if (qName.equals(RULE)) {
        translations.clear();
        id = attrs.getValue("id");
        if (!(inRuleGroup && defaultOff)) {
          defaultOff = "off".equals(attrs.getValue("default"));
        }
        if (inRuleGroup && id == null) {
          id = ruleGroupId;
        }
        correctExamples = new ArrayList<>();
        incorrectExamples = new ArrayList<>();
      } else if (qName.equals(PATTERN)) {
        inPattern = true;
        String languageStr = attrs.getValue("lang");
        if (Languages.isLanguageSupported(languageStr)) {
          language = Languages.getLanguageForShortCode(languageStr);
        }
      } else if (qName.equals(TOKEN)) {
        setToken(attrs);
      } else if (qName.equals(TRANSLATION)) {
        inTranslation = true;
        String languageStr = attrs.getValue("lang");
        if (Languages.isLanguageSupported(languageStr)) {
          Language tmpLang = Languages.getLanguageForShortCode(languageStr);
          currentTranslationLanguage = tmpLang;
          if (tmpLang.equalsConsiderVariantsIfSpecified(motherTongue)) {
            translationLanguage = tmpLang;
          }
        }
      } else if (qName.equals(EXAMPLE)) {
        correctExample = new StringBuilder();
        incorrectExample = new StringBuilder();
        if (attrs.getValue(TYPE).equals("incorrect")) {
          inIncorrectExample = true;
        } else if (attrs.getValue(TYPE).equals("correct")) {
          inCorrectExample = true;
        } else if (attrs.getValue(TYPE).equals("triggers_error")) {
          throw new RuntimeException("'triggers_error' is not supported for false friend XML");
        }
      } else if (qName.equals(MESSAGE)) {
        inMessage = true;
        message = new StringBuilder();
      } else if (qName.equals(RULEGROUP)) {
        ruleGroupId = attrs.getValue("id");
        inRuleGroup = true;
        defaultOff = "off".equals(attrs.getValue(DEFAULT));
      }
    }
docs: ===========================================================