code: private SAXBuilder getSAXBuilder() {
      final LineNumberSAXBuilder builder = new LineNumberSAXBuilder();
  
      // this parser configuration will use an xsd schema for validation
      // if one is specified in the xml itself and if that xsd can be found
      builder.setFeature("http://apache.org/xml/features/validation/schema", true);
      builder.setFeature("http://apache.org/xml/features/validation/dynamic", true);
      builder.setFeature("http://apache.org/xml/features/validation/schema-full-checking", true);
  
      builder.setErrorHandler(new ErrorHandler() {
  
        /** {@inheritDoc} */
        @Override
        public void error(SAXParseException exception) throws SAXParseException {
          throw exception;
        }
  
        /** {@inheritDoc} */
        @Override
        public void fatalError(SAXParseException exception) throws SAXParseException {
          throw exception;
        }
  
        /** {@inheritDoc} */
        @Override
        public void warning(SAXParseException exception) throws SAXParseException {
          if (treatWarningsAsErrors) {
            throw exception;
          } else {
            parseWarnings.add(new ParseWarning(exception.getMessage(), exception.getLineNumber()));
          }
        }
  
      });
      return builder;
    }
docs: Creates a <code>SAXBuilder</code> to build a JDOM tree using SAX.
  @return a <code>SAXBuilder</code> to build a JDOM tree using SAX.