Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7873715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:35:41+00:00 2026-06-03T02:35:41+00:00

In simple way, I want to save some data in XML file when i

  • 0

In simple way, I want to save some data in XML file when i tried this code it ran successfully but,unfortunately i didn’t the file in the project folder or anywhere on my computer.When I changed the path also i didn’t find it.
The following is the used code

string configFile = @"config.xml";
XmlDocument xml = new XmlDocument();
XmlElement element = xml.CreateElement("Configuration");
xml.AppendChild(element);
//---create the <LastAccess> element---
element = xml.CreateElement("LastAccess");
element.InnerText = DateTime.Now.ToString();
xml.DocumentElement.AppendChild(element);
//---create the <LastSearchString> element---
element = xml.CreateElement("LastSearchString");
element.InnerText = "sushi";
xml.DocumentElement.AppendChild(element);
xml.Save(configFile);

Can you help me in this problem please.

When I wrote this code and ran the application the file must be saved whatever where

    XmlDocument xml = new XmlDocument();
    XmlElement element = xml.CreateElement("First");
    xml.AppendChild(element);
    element = xml.CreateElement("Second");
    element.InnerText = "LaLa";
    xml.DocumentElement.AppendChild(element);
    xml.Save(@"XML.xml");

and then i try this code as the file has been saved

    element.InnerText = "LaLa";
    xml.DocumentElement.AppendChild(element);
    xml.Save(@"XML.xml");

I got that exception Could not find file ‘\XML.xml’.
please can you help me in this problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T02:35:42+00:00Added an answer on June 3, 2026 at 2:35 am

    The emulator is, for all intents and purposes of this question, a completely separate device. It does not “share” any part of it’s file system with the host PC, so there’s no way to “browse” it’s files (like the one you created” from the PC’s Windows Explorer, or the standard file system APIs.

    If you want access to the file from the PC, you need to use one of the following to retrieve it:

    1. Configure the emulator to share a folder with the PC. This is don’t in the options of the Emulator itself and allows you to “mount” a Host PC folder. That folder becomes the “\Storage Card” root folder in the emulator, so you’d have to change your code appropriately (i.e. save to “\storage card\config.xml”)
    2. Use a tool like Remote Registry Editor (in the Start menu under Visual Studio 22008 remote tools), connect to the emulator and download the file.
    3. Use the Emulator Manager to “dock” the emulator so it shows up in ActiveSync/WMDC. When that occurs, a shell extension will show the device in Windows Explorer – though be aware that it is purely a shell extension. There is still no file API access to that system, so you could not write a desktop app that navigates to “My Device\MyFolder\MyFile.xml”.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

who can give me a simple code , i want a simplest way to
I have a framework which works this way: After defining some meta data, it
I have some reference data in a text file (~5MB) that I want to
I'm looking for as simple way to create an identity set. I just want
I want a simple TextView to behave the way simple_list_item_1 in a ListView does.
Is there a simple way of redirecting serial port output to a file, that
I am coding a little script to save some data from Internet every single
I'm planning some simple application and want to follow the single responsibility and encapsulation
Im trying to figure out a way to get some JSON data transfered from
This is kind of a long way to go to ask a simple question,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.