code: public void writeAsMusicXML(Tune tune, File file) throws IOException {
  		BufferedWriter writer = new BufferedWriter(new FileWriter(file));
  		Document doc = createMusicXmlDOM(tune);
  		// dumpDOM(doc);
  		writeAsMusicXML(doc, writer);
  		writer.flush();
  		writer.close();
  	}
docs: Writes the specified tune to the specified file as MusicXML.
  
  @param file
  A file.
  @param tune
  A tune.
  @throws IOException
  Thrown if the file cannot be created.