code: private static Document createXML(String root, boolean useNamespace) {
  		try {
  			org.w3c.dom.Document doc = getDocumentBuilder(null, useNamespace).newDocument();
  			doc.appendChild(doc.createElement(root));
  			return new DocumentImpl(doc);
  		} catch (Exception e) {
  			throw new DomException(e);
  		}
  	}
docs: Helper method for XML document creation.
  
  @param root name of the root element,
  @param useNamespace flag to control name space awareness.
  @return newly create document.