Writing an XML file using c# on windows mobile 6.5 RRS feed

  • Question

  • Hi,

    Actually i found a tutorial about how to create an XML file using c# on Visual Studio 2008, my Windows Mobile 6.5 application contains a simple form in which the user type informations, the duty is to import these information and put them into an XML file which will be used after as a database input data with SQL Server 2008.

    My code looks quiet right, and it should directly execute and create that file.

    using System.Xml;
    private void menuItem1_Click (object sender, EventArgs e)
                XmlTextWriter xWriter = new XmlTextWriter ("fiche.xml", Encoding.UTF8);
                xWriter.Formatting = Formatting.Indented;
                xWriter.WriteStartElement("fiche"); //<Fiche>
                xWriter.WriteEndElement(); //</Fiche>

    The problem is, when I click on the play button in order to debug nothing happen after. I should find the fiche.xml file in the program folder but nothing happened.
    • Moved by CoolDadTx Tuesday, February 28, 2012 6:46 PM Mobile related (From:Visual C# IDE)
    Tuesday, February 28, 2012 6:19 PM


  • You should not find that file in the program folder as path you provided does not point to it.

    File would be in the root folder of the device. That is because devices don't have relative paths and/or drive letters, all paths are absolute and start from the root.

    This posting is provided "AS IS" with no warranties, and confers no rights.

    • Marked as answer by e_nys Tuesday, February 28, 2012 7:24 PM
    Tuesday, February 28, 2012 7:20 PM