public static void storePropertiesToXML(String whereToStoreXML) throws IOException {
         
	        OutputStream outputStream = null;
	        Properties properties = new Properties();
	        properties.setProperty("jdbc.url", "mysql://localhost:3306/");
	        properties.setProperty("jdbc.username:", "root");
	        properties.setProperty("jdbc.username:", "root");
	        try {
	        	outputStream = new FileOutputStream(whereToStoreXML);
	        	properties.storeToXML(outputStream, "Dynamically generating properties file as XML");
	        } catch (FileNotFoundException e) {
	            e.printStackTrace();
	        }	         
	    }