code: private static Document loadXML(InputSource source, boolean useNamespace) {
  		try {
  			org.w3c.dom.Document doc = getDocumentBuilder(null, useNamespace).parse(source);
  			return new DocumentImpl(doc);
  		} catch (Exception e) {
  			throw new DomException(e);
  		} finally {
  			close(source);
  		}
  	}
docs: Helper method to load XML document from input source.
  
  @param source input source,
  @param useNamespace flag to control name space awareness.
  @return newly created XML document.