code: public static DocumentBuilderFactory getStandardDocumentBuilderFactory(boolean validating) {
          DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
  
          try {
              // enable validation (must specify a grammar)
              dbf.setValidating(validating);
              dbf.setFeature("http://xml.org/sax/features/validation", validating);
  
              dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-dtd-grammar", validating);
              dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", validating);
  
              dbf.setFeature("http://apache.org/xml/features/validation/schema", true);
              dbf.setFeature("http://xml.org/sax/features/namespaces", true);
  
              dbf.setFeature("http://apache.org/xml/features/dom/include-ignorable-whitespace", false);
          } catch (ParserConfigurationException pce) {
              throw new RuntimeException("Cannot load standard DocumentBuilderFactory. " + pce.getMessage(), pce);
          }
  
          dbf.setNamespaceAware(true);
          dbf.setIgnoringComments(true);
          dbf.setExpandEntityReferences(true);
  
          return dbf;
      }
docs: This method creates a DocumentBuilderFactory that we will always need.
  
  @see <a href="http://xerces.apache.org/xerces-j/features.html">Apache XML Features</a>
  @return the standard document builder factory we usually use