code:     protected static void setupFeatures(DocumentBuilderFactory factory) {
          Properties properties = System.getProperties();
          List<String> features = new ArrayList<String>();
          for (Map.Entry<Object, Object> prop : properties.entrySet()) {
              String key = (String) prop.getKey();
              if (key.startsWith(DOCUMENT_BUILDER_FACTORY_FEATURE)) {
                  String uri = key.split(DOCUMENT_BUILDER_FACTORY_FEATURE + ":")[1];
                  Boolean value = Boolean.valueOf((String)prop.getValue());
                  try {
                      factory.setFeature(uri, value);
                      features.add("feature " + uri + " value " + value);
                  } catch (ParserConfigurationException e) {
                      LOG.warn("DocumentBuilderFactory doesn't support the feature {} with value {}, due to {}.", new Object[]{uri, value, e});
                  }
              }
          }
          if (features.size() > 0) {
              StringBuffer featureString = new StringBuffer();
              // just log the configured feature
              for (String feature : features) {
                  if (featureString.length() != 0) {
                      featureString.append(", ");
                  }
                  featureString.append(feature);
              }
          }
  
      }
  
  