code: protected static Document getDocument(InputStream in)
              throws Exception {
          DocumentBuilder builder = XmlTransformUtility.borrowDocumentBuilder();
          Document doc = null;
          try {
              doc = builder.parse(in);
          } finally {
              XmlTransformUtility.returnDocumentBuilder(builder);
          }
          return doc;
      }
docs: Get a new DOM Document object from parsing the specified InputStream.
  
  @param in
  the InputStream to parse.
  @return a new DOM Document object.
  @throws ParserConfigurationException
  if a DocumentBuilder cannot be created.
  @throws SAXException
  If any parse errors occur.
  @throws IOException
  If any IO errors occur.