code: @Override
    public void startElement(String namespaceURI, String lName,
        String qName, Attributes attrs) throws SAXException {
      switch (qName) {
        case RULES:
          String languageStr = attrs.getValue("targetLang");
          language = Languages.getLanguageForShortCode(languageStr);
          break;
        case RULE:
          super.startElement(namespaceURI, lName, qName, attrs);
          correctExamples = new ArrayList<>();
          incorrectExamples = new ArrayList<>();
          break;
        case TARGET:
          startPattern(attrs);
          break;
        case SOURCE:
          srcLang = Languages.getLanguageForShortCode(attrs.getValue("lang"));
          break;
        default:
          super.startElement(namespaceURI, lName, qName, attrs);
          break;
      }
    }
docs: ===========================================================