class ConfigurationUtils {

  public static void load(Configuration conf, InputStream is)
      throws IOException {
    try {
      DocumentBuilderFactory docBuilderFactory =
          DocumentBuilderFactory.newInstance();
      // ignore all comments inside the xml file
      docBuilderFactory.setIgnoringComments(true);
      DocumentBuilder builder = docBuilderFactory.newDocumentBuilder();
      Document doc = builder.parse(is);
      parseDocument(conf, doc);
    } catch (SAXException | ParserConfigurationException e) {
      throw new IOException(e);
    }
  }

}