docs: protected void loadXMLPatternDefinitions(InputStream xmlInputStream) throws JDOMException, IOException {
          strings = new ArrayList<BoyerMooreMatcher>();
          patterns = new ArrayList<Pattern>();
          
          SAXBuilder builder = new SAXBuilder();
          Document doc = builder.build(xmlInputStream);
          Element el = doc.getRootElement();
          String value;
          
          // now we have the <root> tag indexed so we can
          // go ahead for boundaries and tests
          for (Object obj : el.getChildren(TAG_PATTERN)) {
              el = (Element)obj;
              value = el.getText();
              
              // Check if the pattern has been set to null
              if (value != null && !value.isEmpty()) {
              
                  // Check if a regex expression has been set
                  if (el.getAttributeValue(TAG_PATTERN_TYPE).equalsIgnoreCase(TAG_PATTERN_TYPE_REGEX)) {
                      patterns.add(Pattern.compile(el.getText()));
                  
                  // Otherwise it's by default an exact match model
                  } else {
                      strings.add(new BoyerMooreMatcher(el.getText()));
                  }
              }
          }
      }