public static Document newDocument() throws ParserConfigurationException {
  DocumentBuilderFactory dbfac=DocumentBuilderFactory.newInstance();
  DocumentBuilder docBuilder;
  docBuilder=dbfac.newDocumentBuilder();
  return docBuilder.newDocument();
}

public static Document newDocument ( ) throws ParserConfigurationException { DocumentBuilderFactory dbfac = DocumentBuilderFactory . newInstance ( ) ; DocumentBuilder docBuilder ; docBuilder = dbfac . newDocumentBuilder ( ) ; return docBuilder . newDocument ( ) ; }
creates a new document used for saving xml files .
