static void ExportXMLfile(string XMLfile)
{
string filename = XMLfile;
try
{
File.Delete(XMLfile);
}
catch
{
// Console.Write(".X2." + XMLfile + ".");
}
XmlTextWriter xml = null;
xml = new XmlTextWriter(filename, null);
xml.WriteStartDocument();
xml.WriteStartElement("Features");
xml.WriteWhitespace("\n");
xml.WriteElementString("Score", GlobalVar.myScore.ToString());
xml.WriteWhitespace("\n ");
xml.WriteEndElement();
xml.WriteWhitespace("\n");
xml.WriteEndDocument();
//Write the XML to file and close the writer.
xml.Flush();
xml.Close();
}