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

  • Home
  • SEARCH
  • 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 6559095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:16:50+00:00 2026-05-25T13:16:50+00:00

Hello Everyone, I am working on an application in which i need to save

  • 0

Hello Everyone,
I am working on an application in which i need to save some data in IsolatedStorage .
while my application is running i am able to see data from file. Once i close my application and restarting my application its not showing my data.

 public static IsolatedStorageFile isstore = IsolatedStorageFile.GetUserStoreForApplication();
 public static IsolatedStorageFileStream xyzStrorageFileStream = new IsolatedStorageFileStream("/category.xml", System.IO.FileMode.OpenOrCreate, isstore);


public static XDocument xmldoc = XDocument.Load("category.xml");
favouriteDoc.Save(rssFavouriteFileStream);
rssFavouriteFileStream.Flush();

Any one having any idea? How to do this?

  • 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-05-25T13:16:51+00:00Added an answer on May 25, 2026 at 1:16 pm

    In order to save structured data you need to use XML Writer or XML Serializer.

    For example to save data:

    using (IsolatedStorageFile myIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication())
    {
        using (IsolatedStorageFileStream isoStream = new IsolatedStorageFileStream("People2.xml", FileMode.Create, myIsolatedStorage))
        {
            XmlWriterSettings settings = new XmlWriterSettings();
            settings.Indent = true;
            using (XmlWriter writer = XmlWriter.Create(isoStream, settings))
            {
    
                writer.WriteStartElement("p", "person", "urn:person");
                writer.WriteStartElement("FirstName", "");
                writer.WriteString("Kate");
                writer.WriteEndElement();
                writer.WriteStartElement("LastName", "");
                writer.WriteString("Brown");
                writer.WriteEndElement();
                writer.WriteStartElement("Age", "");
                writer.WriteString("25");
                writer.WriteEndElement();
                // Ends the document
                writer.WriteEndDocument();
                // Write the XML to the file.
                writer.Flush();
            }
        }
    }
    

    To read it back:

    try
    {
        using (IsolatedStorageFile myIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication())
        {
            IsolatedStorageFileStream isoFileStream = myIsolatedStorage.OpenFile("People2.xml", FileMode.Open);
            using (StreamReader reader = new StreamReader(isoFileStream))
            {
                this.tbx.Text = reader.ReadToEnd();
            }
        }
    }
    catch
    { }
    

    Answer is taken from this article, so all the credits go to WindowsPhoneGeek. Also, see other examples in the aforementioned article header.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello everyone I'm trying to improve my Java skills by solving some problems from
Hello everyone i want search data from invoices and client by today date I'm
Hello everyone here... I need to build up a swing application related to vehicle
Hello everyone please help me out regarding this query which is fetching the data
Hello everyone :I am working on a .net mvc3 application. Here is my controller
First question here so hello everyone. The requirement I'm working on is a small
Hello and thanks to everyone for reading my question. I've been working on a
hello everyone I'm working with Eclipse under Windows XP, but I can't find there
Hello everyone I been trying get php uploader working but having a lot of
Hello Everyone, I am developing an app which have to show all the restaurants

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.