code: public static Document resourceFileToXMLDocument(final String location, final String fileName) {
          if (location == null || fileName == null) return null;
  
          final InputStream in = ResourceUtilities.class.getResourceAsStream(location + fileName);
          if (in == null) return null;
  
          final DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
          final DocumentBuilder dBuilder;
          Document doc = null;
          try {
              dBuilder = dbFactory.newDocumentBuilder();
              doc = dBuilder.parse(in);
          } catch (Exception e) {
              LOG.error("Failed to parse the resource as XML.", e);
          } finally {
              try {
                  in.close();
              } catch (IOException e) {
                  LOG.error("Failed to close the InputStream", e);
              }
          }
          return doc;
      }
docs: Reads a resource file and converts it into a XML based Document object.
  
  @param location The location of the resource file.
  @param fileName The name of the file.
  @return The Document that represents the contents of the file or null if an error occurred.